[p4] Determine if depots directory contains unnecessary files
perforce-user-forum at forums.perforce.com
Tue Aug 16 08:45:01 PDT 2016
Posted on behalf of forum user 'P4Sam'.
Matt Janulewicz, on 2016/08/15 17:27:18 UTC, said:
> $ p4 fstat -Oc -T lbrFile ywaves.err1 ... lbrFile //depot/demo/majanu/ywaves.err1
> This points at where your library file is, relative to your server's root. In my case, this archive would be at /p4/1/root/depot/demo/majanu/ywaves.err[undetermined]
> The "[undetermined]" tag in the above line is because text files (historically) were stored in an RCS file with a ',v' extension. Binary files are in their own subdirectory with a ',d' extension. Complicating matters is that you could set the server these days to store everything in an individual gz set of archives, so now even text files might be in a ',d' directory. If you wanted to be safe, you'd parse out all those paths and rsync both the ',v' files and ',d' directories.
Given that you've already written a script around it this probably isn't
useful, but if you want to figure this out from the metadata with no guessing,
look at the lbrType field:
C:\test>p4 fstat -Oc foo#1 | grep lbr ... lbrFile //stream/rel1/foo ...
lbrRev 1.10 ... lbrType text ... lbrIsLazy 1
The lbrType is the storage type; if it says "text" the revision is in
a ,v file (named lbrFile,v) and if it says "binary" the revision is a
gzip in a directory (named lbrFile,d). The lbrRev tells you the name
the revision is stored under.
Please click here to see the post in its original format:
More information about the perforce-user