Enhance our support for Codebase HQ.

Review Request #8143 — Created May 6, 2016 and submitted

Information

Review Board
release-2.0.x
ae3d47a...

Reviewers

This introduces support for Subversion and Mercurial repositories hosted
on Codebase HQ. We now go through the Codebase API for all repository
validation and file fetching, which gives us the ability to work with
all supported repository types.

There is one bug in their API that we're encountering and working
around, which is that their file contents API is returning contents with
the final trailing newline removed. This breaks patching, and in order
to work around it, we need to add that newline back in. This could
conceivably cause other problems (and we're having to make an educated
guess about the type of newline to insert), but it will solve the common
case until Codebase fixes the problem (which has been reported).

There's no support yet for post-commit review, as their API lacks
commits pagination and the ability to get a diff for a commit.

Unit tests pass.

Tested each type of repository by hand. I was able to validate the
repository configuration, post changes, and view the diffs.

Description From Last Updated

local variable 'api_key' is assigned to but never used

reviewbotreviewbot

redefinition of unused 'test_get_file_exists_with_mercurial' from line 1105

reviewbotreviewbot

Can we make this clearer that if the input can't be parsed, it returns None?

daviddavid
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/hostingsvcs/codebasehq.py
        reviewboard/hostingsvcs/errors.py
        reviewboard/hostingsvcs/tests.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/hostingsvcs/codebasehq.py
        reviewboard/hostingsvcs/errors.py
        reviewboard/hostingsvcs/tests.py
    
    
  2. reviewboard/hostingsvcs/codebasehq.py (Diff revision 1)
     
     
    Show all issues
     local variable 'api_key' is assigned to but never used
    
  3. reviewboard/hostingsvcs/tests.py (Diff revision 1)
     
     
    Show all issues
     redefinition of unused 'test_get_file_exists_with_mercurial' from line 1105
    
  4. 
      
chipx86
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/hostingsvcs/codebasehq.py
        reviewboard/hostingsvcs/errors.py
        reviewboard/hostingsvcs/tests.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/hostingsvcs/codebasehq.py
        reviewboard/hostingsvcs/errors.py
        reviewboard/hostingsvcs/tests.py
    
    
  2. 
      
brennie
  1. Ship It!
  2. 
      
david
  1. 
      
  2. reviewboard/hostingsvcs/codebasehq.py (Diff revision 2)
     
     
     
     
     
     
     
     
     
     
     
     
    Show all issues

    Can we make this clearer that if the input can't be parsed, it returns None?

  3. 
      
chipx86
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        reviewboard/hostingsvcs/codebasehq.py
        reviewboard/hostingsvcs/errors.py
        reviewboard/hostingsvcs/tests.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/hostingsvcs/codebasehq.py
        reviewboard/hostingsvcs/errors.py
        reviewboard/hostingsvcs/tests.py
    
    
  2. 
      
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-2.0.x (6a591fb)