diff --git a/mercurial/sshrepo.py b/mercurial/sshrepo.py --- a/mercurial/sshrepo.py +++ b/mercurial/sshrepo.py @@ -13,7 +13,7 @@ demandload(globals(), "hg os re stat uti class sshrepository(remoterepository): def __init__(self, ui, path, create=0): - self.url = path + self._url = path self.ui = ui m = re.match(r'ssh://(([^@]+)@)?([^:/]+)(:(\d+))?(/(.*))?', path) @@ -48,6 +48,9 @@ class sshrepository(remoterepository): self.validate_repo(ui, sshcmd, args, remotecmd) + def url(self): + return self._url + def validate_repo(self, ui, sshcmd, args, remotecmd): cmd = '%s %s "%s -R %s serve --stdio"' cmd = cmd % (sshcmd, args, remotecmd, self.path) @@ -180,7 +183,7 @@ class sshrepository(remoterepository): return 1 return int(r) - def addchangegroup(self, cg, source): + def addchangegroup(self, cg, source, url): d = self.call("addchangegroup") if d: raise hg.RepoError(_("push refused: %s") % d)