[p4] determining the status of a clientspec

Dave Lewis dlewis at vignette.com
Tue Oct 9 13:50:53 PDT 2001

  > At 01:01 PM 10/9/2001 -0400, Marc Unangst wrote:
  > >Perhaps a simple question, but...Is there any way to determine what 
  > >changelist a client is sync'd to?  I know that you can use "p4 have" to 
  > >see what version of a particular file your client has, but I'm interested 
  > >in something more comprehensive.  I suppose it might not always be 
  > >possible to generate this, if the user has been creative about syncing 
  > >various subsets of their workspace, but it seems like it should be 
  > >possible to generate largest-subset information (i.e., this subdir is 
  > >sync'd to change #1234, this subdir to change #1245, etc.).

I used to use the command

p4 -c clientname changes -s submitted -m1 @clientname

this is actually an expensive command to run, btw.

and... the results are not always what you might think they
should be. There is no telling (in general) how the client was synced,
so a changenumber might not be an accurate reflection of the
state of the client.  This is particularly true if it is a client
being used for development.  As somebody pointed out, if you submit
a change from the client, then that will be the latest changenumber for
it, but it does not mean that all the intervening changes were synced.

that is, you sync to change 10, develop and submit change 15. now the
command will tell you the highest change in your client is 15, but you
never synced in 11,12,13, & 14.

best strategy is to sync to known changenumber and save the info.

I haven't been keeping up, so I hope this info is relevant!


More information about the perforce-user mailing list