mercurial/sshrepo.py
changeset 3599 e00920b4f1cb
parent 3447 ef1032c223e7
child 3764 6652209d104d
--- a/mercurial/sshrepo.py
+++ b/mercurial/sshrepo.py
@@ -16,7 +16,7 @@ class sshrepository(remoterepository):
         self._url = path
         self.ui = ui
 
-        m = re.match(r'ssh://(([^@]+)@)?([^:/]+)(:(\d+))?(/(.*))?', path)
+        m = re.match(r'^ssh://(([^@]+)@)?([^:/]+)(:(\d+))?(/(.*))?$', path)
         if not m:
             self.repoerror(_("couldn't parse location %s") % path)