clfilter: use unfiltered repo for bookmark push logic
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Mon, 08 Oct 2012 17:50:02 +0200
changeset 18009 67c874d14c2c
parent 18008 cf91b36f368c
child 18010 38b51a60a195
clfilter: use unfiltered repo for bookmark push logic The remote location of the bookmark may be filtered locally. This changeset ensures that bookmark movement logic has access to all the repo's content.
mercurial/localrepo.py
--- a/mercurial/localrepo.py	Mon Oct 08 17:26:23 2012 +0200
+++ b/mercurial/localrepo.py	Mon Oct 08 17:50:02 2012 +0200
@@ -1861,6 +1861,7 @@
         if not remote.canpush():
             raise util.Abort(_("destination does not support push"))
         # get local lock as we might write phase data
+        unfi = self.unfiltered()
         locallock = self.lock()
         try:
             self.checkpush(force, revs)
@@ -1869,7 +1870,6 @@
             if not unbundle:
                 lock = remote.lock()
             try:
-                unfi = self.unfiltered()
                 # discovery
                 fci = discovery.findcommonincoming
                 commoninc = fci(unfi, remote, force=force)
@@ -2012,12 +2012,12 @@
         self.ui.debug("checking for updated bookmarks\n")
         rb = remote.listkeys('bookmarks')
         for k in rb.keys():
-            if k in self._bookmarks:
+            if k in unfi._bookmarks:
                 nr, nl = rb[k], hex(self._bookmarks[k])
-                if nr in self:
-                    cr = self[nr]
-                    cl = self[nl]
-                    if bookmarks.validdest(self, cr, cl):
+                if nr in unfi:
+                    cr = unfi[nr]
+                    cl = unfi[nl]
+                    if bookmarks.validdest(unfi, cr, cl):
                         r = remote.pushkey('bookmarks', k, nr, nl)
                         if r:
                             self.ui.status(_("updating bookmark %s\n") % k)