Commits

Steve Borho committed 190706a

sync: restrict ssh url splits to singles (fixes #623)

  • Participants
  • Parent commits e716c6f
  • Branches stable

Comments (0)

Files changed (1)

File tortoisehg/hgqt/sync.py

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