Perform: creates a local backup of the current pending list
In perforce, I have a list of files to change Now I want to go back to the base, but I haven't loosened my changes, so I want to put them somewhere Like saving diff for each file. Later, I want to restore these changes and continue my work
Is that possible? If so, what?
thank you!
Solution
Assuming that you are using a UNIX machine (or have appropriate cygwin settings under windows and have not been tested), no external tools are required The only thing to note is that the P4 difference of perforce will produce an output patch incompatible with... So you need it to point to your Unix diff command What can you do on your client
P4DIFF=/usr/bin/diff p4 diff -du > pending-changes.patch
Optional (if you want to restore an open file from the command line, otherwise use p4v):
p4 revert `p4 opened|awk -F\# '{print $1}'`
You will open the file to Edit later (you can extract the affected file from patchfile pending-changes.patch, and then:
patch < pending-patches
Depending on the path layout in your client root directory, you must use the patch's -p#num option to clean up the application