##// END OF EJS Templates
peer: remove cancopy from peer api; use directly on repo instead
Sune Foldager -
r17194:32a6a33b default
parent child Browse files
Show More
@@ -302,7 +302,8 b' def clone(ui, peeropts, source, dest=Non'
302 dircleanup = DirCleanup(dest)
302 dircleanup = DirCleanup(dest)
303
303
304 copy = False
304 copy = False
305 if srcpeer.cancopy() and islocal(dest) and not srcrepo.revs("secret()"):
305 if (srcrepo and srcrepo.cancopy() and islocal(dest)
306 and not srcrepo.revs("secret()")):
306 copy = not pull and not rev
307 copy = not pull and not rev
307
308
308 if copy:
309 if copy:
@@ -46,9 +46,6 b' class localpeer(peer.peerrepository):'
46 def local(self):
46 def local(self):
47 return self._repo
47 return self._repo
48
48
49 def cancopy(self):
50 return self._repo.cancopy() # so bundlerepo can override
51
52 def canpush(self):
49 def canpush(self):
53 return True
50 return True
54
51
@@ -42,9 +42,6 b' class peerrepository(object):'
42 def peer(self):
42 def peer(self):
43 return self
43 return self
44
44
45 def cancopy(self):
46 return False
47
48 def canpush(self):
45 def canpush(self):
49 return True
46 return True
50
47
General Comments 0
You need to be logged in to leave comments. Login now