Prevent repos being created with Hg over SSH

Review Request #8158 — Created May 12, 2016 and submitted

Information

Review Board
release-2.0.x
3cbabd1...

Reviewers

Mercurial doesn't allow SSH urls, so we explicitly prevent them in the
SCMTool class for Mercurial. The code has been updated to be more
robust and use urlparse to extract the scheme from the URL.

  • Attempted to create a SSH repository; it failed as expected.
  • Ran unit tests.
Description From Last Updated

Shouldn't we also check to make sure there's no raw file URL specified? I think it's fine to have an …

daviddavid

This loses support for https.

daviddavid
reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/scmtools/tests.py
        reviewboard/scmtools/hg.py
    
    
  2. 
      
david
  1. 
      
  2. reviewboard/scmtools/hg.py (Diff revision 1)
     
     
    Show all issues

    Shouldn't we also check to make sure there's no raw file URL specified? I think it's fine to have an ssh path as long as there's also a raw file URL.

    1. Hg doesn't have support for a raw file URL.

    2. And if they're running some HTTP server to serve their HG stuff, its most likely hgweb which we support over http

    3. OK.

  3. 
      
david
  1. 
      
  2. reviewboard/scmtools/hg.py (Diff revision 1)
     
     
    Show all issues

    This loses support for https.

  3. 
      
brennie
reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        reviewboard/scmtools/tests.py
        reviewboard/scmtools/hg.py
    
    
  2. 
      
david
  1. Ship It!
  2. 
      
brennie
Review request changed
Status:
Completed
Change Summary:
Pushed to release-2.0.x (1e27a68)