[PATCH 3 of 5 RFC] remove cancopy from peer api; use directly on repo instead
Sune Foldager
cryo at cyanite.org
Tue Jun 26 16:41:24 CDT 2012
# HG changeset patch
# User Sune Foldager <cryo at cyanite.org>
# Date 1314970472 -7200
# Node ID 415a68905295b371195d00c4c9921c1e56df3225
# Parent 715fbb275c68fa3d744ac43b622e6a9bae60ee3a
remove cancopy from peer api; use directly on repo instead
diff -r 715fbb275c68 -r 415a68905295 mercurial/hg.py
--- a/mercurial/hg.py Fri Sep 02 15:33:37 2011 +0200
+++ b/mercurial/hg.py Fri Sep 02 15:34:32 2011 +0200
@@ -299,7 +299,7 @@
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 715fbb275c68 -r 415a68905295 mercurial/localrepo.py
--- a/mercurial/localrepo.py Fri Sep 02 15:33:37 2011 +0200
+++ b/mercurial/localrepo.py Fri Sep 02 15:34:32 2011 +0200
@@ -47,9 +47,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 715fbb275c68 -r 415a68905295 mercurial/peer.py
--- a/mercurial/peer.py Fri Sep 02 15:33:37 2011 +0200
+++ b/mercurial/peer.py Fri Sep 02 15:34:32 2011 +0200
@@ -39,9 +39,6 @@
def peer(self):
return self
- def cancopy(self):
- return False
-
def canpush(self):
return True
More information about the Mercurial-devel
mailing list