[p4] Is there a way to audit a workspace?
william_ivey at bmc.com
Mon Aug 17 08:46:51 PDT 2009
Check out the options for p4 diff. I would think the -sl option
combined with grep would be the simplest check, something like:
p4 diff -sl //workspace/... at lastSync | grep -v '^same'
You'd want to sync to a label (e.g. lastSync) then diff against
that same label to avoid spurious differences due to new submits.
As far as trusting p4 sync, the real trust issue is in the build.
Assuming nothing on the build system alters the content then p4
sync can be trusted, but it's accuracy depends on nothing changing
the workspace contents behind its back. You could do a local check
before and after the build to see if anything changed, and if it
did not, then you know it is safe to sync.
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
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?
More information about the perforce-user