[p4] Re: determining the status of a clientspec
rickm at vsl.com
Tue Oct 9 16:30:27 PDT 2001
I use a slightly different command in my builds:
p4 changes -m1 -s submitted //$P4CLIENT/...
I believe this gives me the highest submitted changelist number for any
file in the clientspec. But the key is I then run
p4 sync //$P4CLIENT/...@$CHANGE
In this way when I stash my build number it truly represents what I need
to sync to later duplicate the set of files. But be clear: my intention is
to build the latest contents of the depot, not to determine or record the
contents of the workspace before my build runs.
The "p4 changes -m1 //depot/main/src/... at garfield" command seems dubious
because of the examples that people have given. There's no guarantee that
this changelist number can ever be used to reconstruct the workspace
On Tue, 9 Oct 2001, Dennis Wheeler wrote:
> perforce-user-request at perforce.com wrote:
> > "p4 changes //depot/main/src/..." tells us about all changelists
> > that affected files under //depot/main/src/, and
> > "p4 changes -m1 will restrict the output so that it's only the
> > most recent one ('-m1') changelist.
> > So, "p4 changes -m1 //depot/main/src/... at garfield" will tell
> > us about the most recent changelist GIVEN to client workspace
> > "garfield".
> Except, if the last changelist only contain deletions, then it will
> report that your most recent changelist # is the previous changelist
> So if, for example, you were to use that number to sync another client,
> or re-sync your current client, you would end up with the wrong set of
> change 12345
> some edits....
> change 12346
> delete this file
> p4 sync ...
> (file deleted in change #12346 has been removed from client)
> p4 changes -m1 @my_client
> change 12345 (this is wrong)
> I once knew a work around for getting the correct number, but I've
> forgotten it.
> -- dennis
> perforce-user mailing list - perforce-user at perforce.com
More information about the perforce-user