Add raw file URL support to the Repository admin page and Git.

Review Request #977 — Created Aug. 20, 2009 and submitted

Information

Review Board SVN (deprecated)

Reviewers

Add raw file URL support to the Repository admin page and Git.

This introduces a new column, raw_file_url, to Repository, and shows it in the
admin UI for SCMTools that support it. This URL provides a way for certain
SCMTools (right now, Git only) to access files over HTTP, instead of checking
the file out through the SCM or accessing it locally (in the case of Git).

The raw file URL acts as a URL with fields to be substituted. If <revision>
exists in the URL, it will be replaced with the revision of the file. If
<filename> exists, it will be replaced with the filename.

This also adds a GitHub hosting service and bug tracker to the Repository
admin. Using this, it's trivial to add any GitHub project without knowing the
raw file URL mask.
Added Djblets from GitHub on my local install and generated a diff against it. It found the files and showed them in the diff viewer correctly.
david
  1. 
      
  2. Indentation here is funky.
    1. vim decided tabs were better than spaces. Fixed all cases of indentation wackiness.
  3. Indentation is funky here, too.
  4. /trunk/reviewboard/scmtools/forms.py (Diff revision 1)
     
     
     
     
     
     
     
    I think you should combine these:
    
    if not self.match_url(...
  5. /trunk/reviewboard/scmtools/git.py (Diff revision 1)
     
     
     
     
    Alphabetize these.
  6. /trunk/reviewboard/scmtools/git.py (Diff revision 1)
     
     
    Should this check for urllib2 vs urllib like the one below, too?
    1. This should be fine. The problem is that, while Python 2.4 has urllib2, it does not have urllib2.quote, requiring that you fall back on urllib.quote.
  7. /trunk/reviewboard/templates/admin/scmtools/change_form.html (Diff revision 1)
     
     
     
     
     
     
     
     
     
     
    Do you need the internal spaceless if you have one around everything?
    1. Yes. I just tested it and removing the inner {% spaceless %} caused a bunch of extra whitespace.
  8. 
      
chipx86
Review request changed
david
  1. 
      
  2. /trunk/reviewboard/scmtools/git.py (Diff revision 2)
     
     
     
     
     
    Can you comment this?
  3. 
      
Loading...