Modified SCMTool.check_repository to properly split out the username from the URI if one was given.

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

Information

Review Board
releases-1.5beta1

Reviewers

Modified SCMTool.check_repository to properly split out the username from the URI if one was given.

 
PH
Review request changed

Change Summary:

Updated the patch to be compatible with Python 2.4, which doesn't support accessing the hostname or username from the urlparse result.

Diff:

Revision 2 (+25 -2)

Show changes

chipx86
  1. 
      
  2. reviewboard/scmtools/core.py (Diff revision 2)
     
     
    Does this wrap to 80 characters?
  3. reviewboard/scmtools/core.py (Diff revision 2)
     
     
    Log messages should be in sentence case.
    
    It would also help to prefix with the SCM type (could just use the class name).
  4. reviewboard/scmtools/core.py (Diff revision 2)
     
     
    Not sure I'm wild about this name. I'd like it to be a little more descriptive given its purpose. Maybe get_auth_from_uri.
    
    Also, why is this a classmethod?
  5. reviewboard/scmtools/core.py (Diff revision 2)
     
     
    Trailing whitespace.
  6. reviewboard/scmtools/core.py (Diff revision 2)
     
     
    Can do:
    
        if '@' in url[1]:
  7. reviewboard/scmtools/core.py (Diff revision 2)
     
     
    Could do:
    
        if not username and not netloc_username:
  8. reviewboard/scmtools/core.py (Diff revision 2)
     
     
    I don't think we need this one.
  9. 
      
david
  1. Submitted with changes as 431d025. Thanks!
  2. 
      
Loading...