Determining the Synced Changelist of a Workspace

TASK

Finding the changelist to which a workspace is synced.


SOLUTION

To show the highest changelist to which your workspace is synced, use the following command:

p4 changes -m1 @clientname

Replace clientname with the name of your client workspace.

What the p4 changes command actually shows is the highest changelist associated with file revisions in your workspace. Typically this is the same as the last changelist that was submitted before you did a p4 sync.

Notes:

  • This only works if you have not submitted anything from the workspace in question.
  • It is also possible that a client workspace is not synced to any specific changelist.
  • To check the answer you get from the p4 changes command above, run:
    p4 sync -n @changelist_number
    
    If the result indicates that any files would be synced or removed, you know that one of the above situations is in effect.