Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to back out a change list by command line?

Tags:

perforce

In perforce, how do you back out a specific change list through the command line? This is easy through the GUI, but I can't find a command line command.

like image 617
coffee Avatar asked Jun 17 '11 18:06

coffee


2 Answers

The GUI is performing a series of commands. Depending on how far you want to rollback and whether or not the change includes adds/deletes/edits or just edits, the sequence of commands slightly differ.

You can refer to the article on Perforce's KB for exact details. They break it up into three different areas:

  • Backing out a recent change (edits only)
  • Backing out an old change (edits only)
  • Backing out a change with adds, edits and deletes
like image 127
Scott Saad Avatar answered Oct 02 '22 12:10

Scott Saad


As of the 2016.2 release you can do:

p4 undo @CHANGE,CHANGE

to undo a changelist.

https://www.perforce.com/perforce/doc.current/user/relnotes.txt

Major new functionality in 2016.2

    #1414787 (Bug #1649) **
        A 'p4 undo' command has been added to simplify the process of
        backing out submitted changes.  See 'p4 help undo'.
like image 24
Samwise Avatar answered Oct 02 '22 12:10

Samwise