1

I have just started to use Perforce as a version control and trying to familiarize myself with the functionality. I am using GUI tool P4V.

Question: How do I understand which revision I have in my workspace?

It is clear for me that when I get the latest revision no files will be changed if I have the latest revision. But how often then I should do it? I was using Mercurial previously and there it was clearly visible which changeset I currently have.

Based on my research I came across command p4 sync -n which should just show the difference, but doesn't do the sync, but what about GUI tool, can it show somehow?

Rufi
  • 2,529
  • 1
  • 20
  • 41
  • P4Vshows much of this status information using different icons for the file. P4V alters the file's icon to show you things like: whether you have the file checked out, whether somebody else has the file checked out, whether you have the head revision or not, whether you need to resolve merges in the file, etc. – Bryan Pendleton Nov 12 '15 at 14:40
  • Ok, but nobody is going to check all the files in the project, this is what I would like to know. – Rufi Nov 13 '15 at 07:07

1 Answers1

1

To get the status on the server side :

In P4V -> View menu -> select the history tab.

Then you can edit the path you want at the top of the interface, and refresh (hit F5). The history tab will give you the list of all changelists affecting that path.

The changelist at the top is the latest changelist you have in your path.

Alternatively, in command line using :

p4 changes -m1 //path/...

m1 restrict the history depth to 1 : so basically the latest changelist in your path.

To get the status on your workspace side :

You can use :

 p4 changes -m1 @workspace_name

Additionally, to list all modification between the current workspace state and the server, you can use :

p4 status

I don't know how to get the latest changelist in a workspace from P4V directly.

see p4 changes documentation for more.

Xavier T.
  • 40,509
  • 10
  • 68
  • 97
  • Yes, I am assuming that I should get it from History tab, but when I check the revisions there I can see the same situation in my workspace and Depot. By your answer that means that I should be in sync. However, when I get the latest revision I can clearly see in the log that files have changes, thus I was out of sync. Have I done something wrong? Or have I just misunderstood you? – Rufi Nov 12 '15 at 10:54
  • @VladimirTikhomirov : you are right I answered the wrong question. I only answered regarding the status of the server. If you want to know on your workspace you can use `p4 changes -m1 @workspacename` I will update the question. – Xavier T. Nov 12 '15 at 12:10
  • Ok, thank you very much for the advices. Lets see if someone knows how to do it in P4V. – Rufi Nov 12 '15 at 13:14