states.py
changeset 5 9445ce78a935
parent 2 166694e62daf
child 7 cc592295900f
--- a/states.py	Mon May 23 14:25:22 2011 +0200
+++ b/states.py	Mon May 23 15:01:57 2011 +0200
@@ -111,6 +111,7 @@
     if not repo.local():
         return
 
+    o_cancopy =repo.cancopy
     class statefulrepo(repo.__class__):
 
         def nodestate(self, node):
@@ -184,5 +185,8 @@
                     selected.add(candidate)
             return sorted(selected)
 
+        def cancopy(self):
+            return o_cancopy() and (self._publicheads == self.heads())
+
     repo.__class__ = statefulrepo