[PATCH 3 of 5] push: use stepsdone to control bookmark push

Pierre-Yves David pierre-yves.david at ens-lyon.org
Mon Aug 18 18:48:01 CDT 2014


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1408153257 25200
#      Fri Aug 15 18:40:57 2014 -0700
# Node ID 9435cddbb3cb5dff6cfd8216fcccf890ceb9d20a
# Parent  9548edead3a6e03cb104206c55665fc5839712dc
push: use stepsdone to control bookmark push

If bookmark are to be integrated in the unified bundle2 we need a way to disable
the old style push.

diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -631,12 +631,13 @@ def _pushobsolete(pushop):
             msg = _('failed to push some obsolete markers!\n')
             repo.ui.warn(msg)
 
 def _pushbookmark(pushop):
     """Update bookmark position on remote"""
-    if pushop.ret == 0:
+    if pushop.ret == 0 or 'bookmarks' in pushop.stepsdone:
         return
+    pushop.stepsdone.add('bookmarks')
     ui = pushop.ui
     remote = pushop.remote
     for b, old, new in pushop.outbookmarks:
         if remote.pushkey('bookmarks', b, old, new):
             ui.status(_("updating bookmark %s\n") % b)


More information about the Mercurial-devel mailing list