diff mercurial/exchange.py @ 25480:d410336fdb3c

push: make pushkey part advisory The current behavior (with bundle1) is to let the rest of the push succeed if the pushkey call (phases, bookmarks) failed (this comes from the fact that each item is sent in its own command). We kept this behavior with bundle2, which is highly debatable, but let us keep thing as they are now as a start. We are about to enforce 'mandatory' pushkey part as 'mandatory' successful, so we need to marks parts as advisory to preserve the current (debatable) behavior.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Wed, 27 May 2015 05:35:00 -0700
parents f00a63a43c4b
children 8182163ae983
line wrap: on
line diff
--- a/mercurial/exchange.py	Mon Jun 08 13:32:38 2015 -0700
+++ b/mercurial/exchange.py	Wed May 27 05:35:00 2015 -0700
@@ -523,7 +523,7 @@
     part2node = []
     enc = pushkey.encode
     for newremotehead in pushop.outdatedphases:
-        part = bundler.newpart('pushkey')
+        part = bundler.newpart('pushkey', mandatory=False)
         part.addparam('namespace', enc('phases'))
         part.addparam('key', enc(newremotehead.hex()))
         part.addparam('old', enc(str(phases.draft)))
@@ -567,7 +567,7 @@
     part2book = []
     enc = pushkey.encode
     for book, old, new in pushop.outbookmarks:
-        part = bundler.newpart('pushkey')
+        part = bundler.newpart('pushkey', mandatory=False)
         part.addparam('namespace', enc('bookmarks'))
         part.addparam('key', enc(book))
         part.addparam('old', enc(old))