Mercurial > public > mercurial-scm > hg-stable
diff mercurial/bundlerepo.py @ 17193:1d710fe5ee0e
peer: introduce canpush and improve error message
author | Sune Foldager <cryo@cyanite.org> |
---|---|
date | Fri, 13 Jul 2012 21:52:28 +0200 |
parents | 5884812686f7 |
children | 03e552aaae67 8ab0640c3090 |
line wrap: on
line diff
--- a/mercurial/bundlerepo.py Fri Jul 13 21:47:06 2012 +0200 +++ b/mercurial/bundlerepo.py Fri Jul 13 21:52:28 2012 +0200 @@ -167,6 +167,10 @@ def _file(self, f): self._repo.file(f) +class bundlepeer(localrepo.localpeer): + def canpush(self): + return False + class bundlerepository(localrepo.localrepository): def __init__(self, ui, path, bundlename): self._tempparent = None @@ -272,6 +276,9 @@ def cancopy(self): return False + def peer(self): + return bundlepeer(self) + def getcwd(self): return os.getcwd() # always outside the repo