Commits

Steve Borho committed 25818ed

sync: use rsplit to break username from url (fixes #623)

All @ in the URL must be part of the username or the url/host divider

Comments (0)

Files changed (1)

tortoisehg/hgqt/sync.py

         p = path[len('ssh://'):]
         user, passwd = None, None
         if p.find('@') != -1:
-            user, p = tuple(p.split('@', 1))
+            user, p = tuple(p.rsplit('@', 1))
             if user.find(':') != -1:
                 user, passwd = tuple(user.rsplit(':', 1))
         m = re.match(r'([^:/]+)(:(\d+))?(/(.*))?$', p)