Friday, June 5, 2015

Perforce: Back-out From an Existing Change

Using super-duper Perforce system for "helix" versioning , but you still make mistakes and need to back out a changelist? And you need to do it from command line, since you are not a GUI person and not good with p4's beautiful "back out" and "rollback" buttons"? Here is how:

> p4 sync <filename>@<the last changelist number before your change>
> p4 edit <filename>
> p4 sync <filename>@<your changelist number>
> p4 resolve -ay
> p4 sync <filename>
> p4 resolve
> p4 submit <filename>

Notes:
  •  If you don't know the filename, check the beginning of "p4 descibe <your changelist number> | less".
  •  If you don't know your changelist number, check "p4 changes | grep <your username>".

No comments:

Post a Comment