Determining Changelist of Workspace

What changelist is my workspace synced to?

Info & Tags

Article #:
51
Created:
04/25/07
Modified:
01/09/08

Task

Finding what changelist a workspace is synced to

Solution

You can use:

     p4 changes -m1 @clientname

to show the highest changelist your client workspace is synced to. Replace clientname with the name of your client workspace.

What this actually shows is the highest changelist that affected any file in your workspace. Typically this is the same as the last changelist that was submitted before you did a p4 sync.

Notes:

  1. If the latest changelist affecting the client workspace is purely deletes, it is not reflected in this answer.
  2. It is also possible that a client workspace is not synced to any specific changelist.
  3. To check the answer you get from the 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.