André Sintzoff  committed 53cb115

sync: append svn+https and git schemes to urlparse.uses_netloc

Old versions of urlparse Python function don't manage RFC 3986 (Uniform
Resource Identifier (URI): Generic Syntax) and schemes like svn+https and git.

As workaround, add these schemes to uses_netloc variable to indicate they have
a netloc attribute as http and https schemes.

First correct versions are Python 2.6.6 and 2.7.

  • Participants
  • Parent commits 5ef7fe2
  • Branches stable
  • Tags 2.4.1

Comments (0)

Files changed (1)

File tortoisehg/hgqt/

             qtlib.WarningMsgBox(_('Malformed ssh URL'), hglib.tounicode(path))
             host, port, folder = '', '', ''
     elif path.startswith(('http://', 'https://', 'svn+https://', 'git://')):
+        # work around
+        if 'svn+https' not in urlparse.uses_netloc:
+            urlparse.uses_netloc.append('svn+https')
+        if 'git' not in urlparse.uses_netloc:
+            urlparse.uses_netloc.append('git')
         snpaqf = urlparse.urlparse(path)
         scheme, netloc, folder, params, query, fragment = snpaqf
         host, port, user, passwd = hglib.netlocsplit(netloc)