user1972031
user1972031

Reputation: 557

View a file with specific version in Perforce

I am new to Perforce and asking for help with following simple questions:

  1. How to list all the versions of a file in Perforce (command-line)
  2. How to view a file with a specific version only.

I searched question 2 online, but didn't have any luck.

Thank you in advance!

Upvotes: 12

Views: 16702

Answers (2)

Anil Raj
Anil Raj

Reputation: 1

And if you don't want to write to a temp file (like others have suggested), you can stream the output to your editor.

For vim/gvim it is: p4 print FILENAME#VERSION | gvim -

The "-" in the end does the trick.

Upvotes: 0

Samwise
Samwise

Reputation: 71454

  1. p4 filelog FILENAME
  2. p4 print FILENAME#VERSION

Upvotes: 17

Related Questions