mercurial/localrepo.py
changeset 18009 67c874d14c2c
parent 18007 2e30972d859d
child 18013 98c867ac1330
--- 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)