Lee
Lee

Reputation: 4046

Showing a change in a shelved perforce file

If a colleague has a file shelved in perforce, and I'd like to diff the file in the shelved changelist against the source version of that file what is the perforce command needed to do this?

For example if the file a.txt is shelved in changelist 156222 how do I view the changes to a.txt that are in the shelved changelist vs. the current review of a.txt

Upvotes: 7

Views: 9889

Answers (2)

user100766
user100766

Reputation:

If you know the revision of the shelved file (e.g. #4) and the head revision (#3 in this case) you can use

p4 diff2 //path/to/depot/file#3 //path/to/depot/file@=<changenumber>

or - even easier - you can use p4 describe (see manual):

p4 describe -S <changenumber>

Find the changenumber with:

p4 changes -u <user> -s shelved

Upvotes: 10

Fl&#225;vio Ivan
Fl&#225;vio Ivan

Reputation: 475

If you are using P4V, you can go to your Pending tab and select the "User" and "Workspace" of your colleague (with the help of the drop-down "Browse..." option).

Then you will see his/her Pending lists, being it composed of shelved files or not. From there, the normal "Diff Against" will work for the "a.txt" file.

Upvotes: 5

Related Questions