[p4] UNIX dot files into Perforce

Tony Sweeney sweeney at addr.com
Wed Aug 22 11:14:51 PDT 2007


Thomas.Wielski at sybase.com wrote:
> Greetings,
>
> We are archiving some  2Gb of UNIX directories into a Perforce depot.
> There are many directory levels there, many symbolic links and many dot
> files (files whose names begin with a dot), as well as dot directories.
> The problem is how to p4 add all files including these dot files and
> directories  to a changelist while using filespec wildcards, short of
> writing complex UNIX shell scripts that locate them and add them one by
> one..
>
>  "p4 add dir/*/*"  and variations thereof do not pick them up.   I suspect
> there must be a simple answer to this question, but I just haven't stumbled
> upon it.
>   
Some variation on:
    DIRS=<your dirs here>
    for dir in $DIRS do
        find $dir -type f -print
    done | p4 -x - add

should do the trick reasonably efficiently.  Be sure to check the man 
page for your version of find(1) -- GNU in particular comes garlanded 
with options.

Tony.
> Thank you in advance,
>
> Thomas Wielski
> Perforce Administrator
> Sybase, Inc
> _______________________________________________
> perforce-user mailing list  -  perforce-user at perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user
>
>
>   


-- 
quis custodiet ipsos custodes? -- Juvenal VI, 347-8



More information about the perforce-user mailing list