[p4] Is there a way to audit a workspace?

Mark Evans evansmark at gmail.com
Mon Aug 17 08:31:50 PDT 2009

You can see which revisions of a file or set of file by running the "p4 have
..." command in the client workspace.

However, that will only tell you what is stored in the Server's db.have meta
data for the revisions synced in the client workspace.  If the build process
itself is clobbering read-only files and making them writable, p4 sync is
never going to sync those files again unless you use the -f option.

If you want to convince your user-base that forcing a sync of the entire
build workspace every day is a bad idea, it sounds like you need to identify
why they feel this is necessary in the first place, and troubleshoot any
issue within the client workspace itself.

A simple way to do this is the run a full sync (without the -f option),
capture the output, and search for the string "Can't clobber writable file".

Hope that helps.

On Mon, Aug 17, 2009 at 11:13 AM, Roy Smith <smith_roy at emc.com> wrote:

> 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
> AIM: roysmith649
> _______________________________________________
> perforce-user mailing list  -  perforce-user at perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user

More information about the perforce-user mailing list