Determining Changelist of Workspace
What changelist is my workspace synced to?
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:
- If the latest changelist affecting the client workspace is purely deletes, it is not reflected in this answer.
- It is also possible that a client workspace is not synced to any specific changelist.
-
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.
