Collapse CVS/RCS keywords for diffs and files in CVS.

Review Request #6702 — Created Dec. 18, 2014 and submitted

Information

Review Board
release-2.0.x
d003b97...

Reviewers

CVS suffered from the same problems as Subversion when it came to
handling keywords in fetched files or diffs, resulting in failed
patches.

We now pass -kk when fetching a file, which will tell CVS to collapse
all keywords. This gives us a sane diff we can apply a patch to.

We then collapse keywords in CVS diffs, similarly to how we handle it
with Subversion. It's a bit simpler in CVS, though, since there are a
set of pre-defined keywords, and they're in a specific format, with no
aliases.

Unit tests were added to ensure that keywords were collapsed when
fetching files, and that collapsing keywords in diffs works fine.

Unit tests pass.

Prior to the fix, both unit tests failed in the expected ways.

Description From Last Updated

local variable 'keywords' is assigned to but never used

reviewbotreviewbot

Can you use single-quotes here?

daviddavid
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/scmtools/cvs.py
        reviewboard/scmtools/tests.py
    
    Ignored Files:
        reviewboard/scmtools/testdata/cvs_repo/CVSROOT/history
        reviewboard/scmtools/testdata/cvs_repo/test/testfile,v
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/scmtools/cvs.py
        reviewboard/scmtools/tests.py
    
    Ignored Files:
        reviewboard/scmtools/testdata/cvs_repo/CVSROOT/history
        reviewboard/scmtools/testdata/cvs_repo/test/testfile,v
    
    
  2. reviewboard/scmtools/cvs.py (Diff revision 1)
     
     
    Show all issues
     local variable 'keywords' is assigned to but never used
    
  3. 
      
chipx86
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/scmtools/cvs.py
        reviewboard/scmtools/tests.py
    
    Ignored Files:
        reviewboard/scmtools/testdata/cvs_repo/CVSROOT/history
        reviewboard/scmtools/testdata/cvs_repo/test/testfile,v
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/scmtools/cvs.py
        reviewboard/scmtools/tests.py
    
    Ignored Files:
        reviewboard/scmtools/testdata/cvs_repo/CVSROOT/history
        reviewboard/scmtools/testdata/cvs_repo/test/testfile,v
    
    
  2. 
      
david
  1. Was there an associated bug?

  2. reviewboard/scmtools/cvs.py (Diff revision 2)
     
     
    Show all issues

    Can you use single-quotes here?

  3. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.0.x (647afed)
Loading...