[p4] Is there a way to audit a workspace?
Grills, Jeff N
Jeff.N.Grills at disney.com
Mon Aug 17 09:35:33 PDT 2009
I totally agree that using a force sync is the wrong way to deal the
issue of the file system getting out of agreement with the p4 client.
It puts an unnecessary burden on the server that could be better handled
on the client. It might not be so bad if you were to sync it through a
I have a script in my guest directory in the perforce public depot that
might be appropriate, or at least give you a starting point (hopefully
this link works):
The downside of this script implementation is that it doesn't deal with
complex client mappings very well, for instance exclusionary mappings
give it a lot of grief.
The script's basic approach is to treat the client like it's been used
offline (with respect to the p4 server), and tell you what needs to
happen to bring the file system back into agreement with the client.
Basically, you want to find any missing files, any changed files, and
any additional files. "p4 diff -sd", "p4 diff -se", and "p4 add" are
respectable ways to do that. Note that the "p4 diff"s don't require
much effort on the server's part - it transfers an MD5SUM to the client,
and the client recalculates its own value and compares them.
From: perforce-user-bounces at perforce.com
[mailto:perforce-user-bounces at perforce.com] On Behalf Of Roy Smith
Sent: Monday, August 17, 2009 10:14 AM
To: perforce-user at perforce.com
Subject: [p4] Is there a way to audit a workspace?
We have a very large workspace where we keep our entire build
toolchain (compilers, tools like perl and python, libraries, etc).
Our build team wants to run "p4 sync -f" every day because they don't
trust "p4 sync" (without the -f) to keep it up to date. I'm trying to
convince them that this is silly. It's certainly very expensive, as
it takes several hours to complete. Worse, the act of doing a "sync -
f" touches the files on disk, so any build that's currently running
can be impacted as files change out from underneath it.
Is there some way to have p4 audit the files on disk and confirm that
what's there is what's supposed to be there, without actually deleting
and re-creating every file?
Roy Smith <smith_roy at emc.com>
Software Guy, EMC
1133 Westchester Ave, 3rd floor
White Plains, NY 10604
+1 914 461 3597
perforce-user mailing list - perforce-user at perforce.com
More information about the perforce-user