# HG changeset patch # User Sune Foldager # Date 1342209157 -7200 # Node ID 32a6a33b9a355ceafb2c6cdeed88ebb63a6cbfc9 # Parent 1d710fe5ee0e99a724311724dda32289b0733c61 peer: remove cancopy from peer api; use directly on repo instead diff -r 1d710fe5ee0e -r 32a6a33b9a35 mercurial/hg.py --- a/mercurial/hg.py Fri Jul 13 21:52:28 2012 +0200 +++ b/mercurial/hg.py Fri Jul 13 21:52:37 2012 +0200 @@ -302,7 +302,8 @@ dircleanup = DirCleanup(dest) copy = False - if srcpeer.cancopy() and islocal(dest) and not srcrepo.revs("secret()"): + if (srcrepo and srcrepo.cancopy() and islocal(dest) + and not srcrepo.revs("secret()")): copy = not pull and not rev if copy: diff -r 1d710fe5ee0e -r 32a6a33b9a35 mercurial/localrepo.py --- a/mercurial/localrepo.py Fri Jul 13 21:52:28 2012 +0200 +++ b/mercurial/localrepo.py Fri Jul 13 21:52:37 2012 +0200 @@ -46,9 +46,6 @@ def local(self): return self._repo - def cancopy(self): - return self._repo.cancopy() # so bundlerepo can override - def canpush(self): return True diff -r 1d710fe5ee0e -r 32a6a33b9a35 mercurial/peer.py --- a/mercurial/peer.py Fri Jul 13 21:52:28 2012 +0200 +++ b/mercurial/peer.py Fri Jul 13 21:52:37 2012 +0200 @@ -42,9 +42,6 @@ def peer(self): return self - def cancopy(self): - return False - def canpush(self): return True