Add revert patch support to the rbt patch command

Review Request #7084 — Created March 19, 2015 and submitted

Information

RBTools
release-0.7.x
cb727d6...

Reviewers

The rbt patch command is now capable of reverting patches via the
-R/--revert command line flag.

Ran unit tests.

Tested rbt patch -R with CVS, Git, Perforce, and SVN.

Applied a patch with Perforce that had empty files and was able to
revert it with rbt patch -R.

Applied a patch with SVN that had empty files and was able to revert
it with rbt patch -R.

Running rbt patch -R when using a Mercurial repository results in an
error as expected.

I am not able to verify that this works with Plastic or ClearCase, but
it should work because they both use the default apply_patch method.

Description From Last Updated

Col: 1 W293 blank line contains whitespace

reviewbotreviewbot
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        rbtools/clients/cvs.py
        rbtools/commands/patch.py
        rbtools/clients/tfs.py
        rbtools/clients/clearcase.py
        rbtools/clients/plastic.py
        rbtools/clients/__init__.py
        rbtools/clients/mercurial.py
        rbtools/clients/git.py
        rbtools/clients/perforce.py
        rbtools/clients/svn.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        rbtools/clients/cvs.py
        rbtools/commands/patch.py
        rbtools/clients/tfs.py
        rbtools/clients/clearcase.py
        rbtools/clients/plastic.py
        rbtools/clients/__init__.py
        rbtools/clients/mercurial.py
        rbtools/clients/git.py
        rbtools/clients/perforce.py
        rbtools/clients/svn.py
    
    
  2. 
      
brennie
brennie
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        rbtools/clients/cvs.py
        rbtools/commands/patch.py
        rbtools/clients/tfs.py
        rbtools/clients/clearcase.py
        rbtools/clients/plastic.py
        rbtools/clients/__init__.py
        rbtools/clients/mercurial.py
        rbtools/clients/git.py
        rbtools/clients/perforce.py
        rbtools/clients/svn.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        rbtools/clients/cvs.py
        rbtools/commands/patch.py
        rbtools/clients/tfs.py
        rbtools/clients/clearcase.py
        rbtools/clients/plastic.py
        rbtools/clients/__init__.py
        rbtools/clients/mercurial.py
        rbtools/clients/git.py
        rbtools/clients/perforce.py
        rbtools/clients/svn.py
    
    
  2. rbtools/clients/__init__.py (Diff revision 2)
     
     
    Show all issues
    Col: 1
     W293 blank line contains whitespace
    
  3. 
      
brennie
reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        rbtools/clients/cvs.py
        rbtools/commands/patch.py
        rbtools/clients/tfs.py
        rbtools/clients/clearcase.py
        rbtools/clients/plastic.py
        rbtools/clients/__init__.py
        rbtools/clients/mercurial.py
        rbtools/clients/git.py
        rbtools/clients/perforce.py
        rbtools/clients/svn.py
    
    
    
    Tool: Pyflakes
    Processed Files:
        rbtools/clients/cvs.py
        rbtools/commands/patch.py
        rbtools/clients/tfs.py
        rbtools/clients/clearcase.py
        rbtools/clients/plastic.py
        rbtools/clients/__init__.py
        rbtools/clients/mercurial.py
        rbtools/clients/git.py
        rbtools/clients/perforce.py
        rbtools/clients/svn.py
    
    
  2. 
      
david
  1. Looks OK, assuming the SVN stuff is taken care of. If so, can you update the description?

  2. 
      
brennie
brennie
Review request changed
Status:
Completed
Change Summary:
Pushed to release-0.7.x (64e6fb1)