mercurial/localrepo.py
branchstable
changeset 20332 a959f7167077
parent 20314 b396032e1bb8
child 20345 8567b4ea76ac
child 20765 f042d4b263f4
--- a/mercurial/localrepo.py	Tue Jan 28 14:00:23 2014 +1100
+++ b/mercurial/localrepo.py	Thu Jan 30 11:52:38 2014 -0800
@@ -692,7 +692,13 @@
         return self
 
     def cancopy(self):
-        return self.local() # so statichttprepo's override of local() works
+        # so statichttprepo's override of local() works
+        if not self.local():
+            return False
+        if not self.ui.configbool('phases', 'publish', True):
+            return True
+        # if publishing we can't copy if there is filtered content
+        return not self.filtered('visible').changelog.filteredrevs
 
     def join(self, f):
         return os.path.join(self.path, f)