mercurial/sshrepo.py
changeset 3599 e00920b4f1cb
parent 3447 ef1032c223e7
child 3764 6652209d104d
equal deleted inserted replaced
3598:27121416f9a8 3599:e00920b4f1cb
    14 class sshrepository(remoterepository):
    14 class sshrepository(remoterepository):
    15     def __init__(self, ui, path, create=0):
    15     def __init__(self, ui, path, create=0):
    16         self._url = path
    16         self._url = path
    17         self.ui = ui
    17         self.ui = ui
    18 
    18 
    19         m = re.match(r'ssh://(([^@]+)@)?([^:/]+)(:(\d+))?(/(.*))?', path)
    19         m = re.match(r'^ssh://(([^@]+)@)?([^:/]+)(:(\d+))?(/(.*))?$', path)
    20         if not m:
    20         if not m:
    21             self.repoerror(_("couldn't parse location %s") % path)
    21             self.repoerror(_("couldn't parse location %s") % path)
    22 
    22 
    23         self.user = m.group(2)
    23         self.user = m.group(2)
    24         self.host = m.group(3)
    24         self.host = m.group(3)