]> granicus.if.org Git - python/commitdiff
Fix Issue8657 - adding git and git+ssh as know schemes.
authorSenthil Kumaran <orsenthil@gmail.com>
Thu, 13 May 2010 03:25:21 +0000 (03:25 +0000)
committerSenthil Kumaran <orsenthil@gmail.com>
Thu, 13 May 2010 03:25:21 +0000 (03:25 +0000)
Lib/test/test_urlparse.py
Lib/urlparse.py

index b45fef97d0b71f068abd4a787fcb3b6240f0e00f..07256a2a1ec1102a994226567c0c3187f258bc6f 100644 (file)
@@ -103,7 +103,12 @@ class UrlParseTestCase(unittest.TestCase):
              ('svn+ssh', 'svn.zope.org', '/repos/main/ZConfig/trunk/',
               '', '', ''),
              ('svn+ssh', 'svn.zope.org', '/repos/main/ZConfig/trunk/',
-              '', ''))
+              '', '')),
+            ('git+ssh://git@github.com/user/project.git',
+            ('git+ssh', 'git@github.com','/user/project.git',
+             '','',''),
+            ('git+ssh', 'git@github.com','/user/project.git',
+             '', ''))
             ]
         for url, parsed, split in testcases:
             self.checkRoundtrips(url, parsed, split)
index 7f3a9a4b5c8ae634a1c172409c6790a64f813447..65bb9cb33a5f988d9fd7e7f24ef437ce691b8851 100644 (file)
@@ -38,7 +38,7 @@ uses_relative = ['ftp', 'http', 'gopher', 'nntp', 'imap',
 uses_netloc = ['ftp', 'http', 'gopher', 'nntp', 'telnet',
                'imap', 'wais', 'file', 'mms', 'https', 'shttp',
                'snews', 'prospero', 'rtsp', 'rtspu', 'rsync', '',
-               'svn', 'svn+ssh', 'sftp','nfs']
+               'svn', 'svn+ssh', 'sftp','nfs','git', 'git+ssh']
 non_hierarchical = ['gopher', 'hdl', 'mailto', 'news',
                     'telnet', 'wais', 'imap', 'snews', 'sip', 'sips']
 uses_params = ['ftp', 'hdl', 'prospero', 'http', 'imap',