diff mercurial/localrepo.py @ 18009:67c874d14c2c

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.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Mon, 08 Oct 2012 17:50:02 +0200
parents 2e30972d859d
children 98c867ac1330
line wrap: on
line diff
--- 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)