Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/sshrepo.py @ 3599:e00920b4f1cb
sshrepo: fix the parsing of the ssh url
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Tue, 31 Oct 2006 23:56:52 +0100 |
parents | ef1032c223e7 |
children | 6652209d104d |
comparison
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) |