ClearCase syntax highlight doesn't work

Review Request #1501 — Created April 2, 2010 and submitted

Information

Review Board
master

Reviewers

After upload diff path in ClearCase version contain part with something similar to @@/main/branch/VERSION. This part is glue after file extension which means it is impossible to pygments determine highlighting by file extension.
This path is proposition to fix the problem.

 
jan.koprowski
jan.koprowski
DJ
  1. 
      
  2. reviewboard/diffviewer/diffutils.py (Diff revision 2)
     
     
    shouldn't this be "ClearCase" ?
    1. reviewboard/scmtools/clearcase.py:
      -------------------------------------
      class ClearCaseTool(SCMTool):
          name = 'Clear Case'
      -------------------------------------
      
      which means I use value appropriate to hardcoded name in class ClearCaseTool.
    2. I see. Looks like the naming is inconsistent between clearcase.py and the scmtool db.
  3. 
      
DJ
  1. 
      
  2. 
      
CK
  1. 
      
  2. reviewboard/scmtools/clearcase.py (Diff revision 2)
     
     
    Wrong return parameters. See proper return
    line 39, it is a tuple of 2 values
  3. 
      
jan.koprowski
chipx86
  1. 
      
  2. reviewboard/diffviewer/diffutils.py (Diff revision 3)
     
     
    This could should never know anything about the SCMTools using it.
    
    What I'd recommend is adding a new method to SCMTool for normalizing paths. Maybe call it "normalize_path_for_display".
    
    The method would take a filename and return a result. By default, it would just return the filename. ClearCaseTool could override this to return the result using unextend_path.
    1. I prepare implementation according Your directions.
  3. 
      
jan.koprowski
jan.koprowski
Review request changed
david
  1. Looks good. Committed as 11c95a2. Thanks!
  2.