[p4] Reduce HD space

Domenic perforce-user-forum at forums.perforce.com
Tue Mar 7 10:50:01 PST 2017

Posted on behalf of forum user 'Domenic'.

I haven't tested this but  in theory  I think it should work  :)  Caveat: we
don't use +S.

It is possible to retype the existing files already checked in via the 'p4
retype' command. The command is unsupported "because it cannot safely
run concurrently with other 'p4 retype', 'p4 snap', or 'p4
obliterate' commands." If you're on a recent version of p4d there
is some locking that tries to maintain consistency (more info at   
http://answers.perforce.com/articles/KB/3163 ) so I'm not sure if that
warning is still applicable or not.

Anyhow, the steps you'd take would be to run "p4 retype +S3
//depot/....uasset" and "p4 retype +S3 //depot/....umap" then
re-run the commands to add the "-l" (that's an L) flag (e.g.
'p4 retype -l +S3 <path>". More info on the command is at 'p4
help retype'.

What that should do is retype all the *.uasset and *.umap files so that
previously checked in versions are also +S3. Then, when the next version gets
checked in the server should purge all the versions so that only 3 are kept.
That would save you from needing to figure out yourself "what are the last
3 revisions of this file?" then obliterating everything else. It does
assume the files will be updated and checked in again at some point, so if there
are old *.uasset or *.umap files with 4+ revisions that aren't being
modified then you'd need to consider obliterating those files.

Note: because 'retype' is an under-the-covers action, you'll also
want to run a 'p4 sync -f //depot/....uasset' and 'p4 sync -f
//depot/....umap' to make sure each client has the right file type. If you
don't, the next time a client checks the file out it will be without the +S3
modifier, so when they check it in the file will revert to whatever its current
type is (binary? binary+l?) and you'll wonder what the heck happened  :)

Please click here to see the post in its original format:

More information about the perforce-user mailing list