0

I'm trying to save a revision of a file without overwriting the current one. Something like "Save Revision As..." where I could rename it and choose where to save it. Is this possible in Perforce?

All I can do right now is overwrite the current revision/changes I have for that file, and I don't want to do that.

john
  • 408
  • 9
  • 30
  • Well, from the **command line**, you could do `p4 print -o other-location-for-file //depot/path/to/file`. I realize that you asked for a way to do this from P4V, but maybe this gives you a temporary solution while you pursue the P4V-based approach. – Bryan Pendleton Mar 07 '16 at 21:35

3 Answers3

0

Right-click on the file (or files, if you prefer) and choose Merge/Integrate, then enter the new path in the "Choose target files/folders:" field. Select the Merge button, then Submit.

tkosinski
  • 1,631
  • 13
  • 17
  • Thanks for the reply. I don't want to submit anything to the server (or check anything out, etc.), I just want to "Save As" a copy locally. – john Mar 08 '16 at 13:22
  • Well, if you ignore the Submit, you'll have what you requested. : ) My answer too long for commens, see other answer. – tkosinski Mar 08 '16 at 18:14
0

Actually, probably best handled as a Custom Tool. Using your favorite scripting tool, write a script that would take two arguments (e.g., I wrote a wee Windows .bat script consisting only of "copy %1 %2"), then create the custom tool. XML from my "SaveRevisionAs" tool:

<CustomToolDefList varName="customtooldeflist">
 <CustomToolDef>
  <Definition>
   <Name>SaveRevisionAs</Name>
   <Command>C:\P4\custom_tools\SaveRevisionAs\SRA.bat</Command>
   <Arguments>%F $D</Arguments>
   <InitDir>C:\P4\custom_tools\SaveRevisionAs</InitDir>
  </Definition>
  <Prompt>
   <PromptText>Save Revision As ...</PromptText>
  </Prompt>
  <AddToContext>true</AddToContext>
 </CustomToolDef>
</CustomToolDefList>
tkosinski
  • 1,631
  • 13
  • 17
0

Click the file. In Right pane you will get all the revision of the particular file in History tab. Right click the revision which you want to save. Here you will get open with option. You can open the file using any text editor and you can save the file locally.