pushbookmark: do not attempt to update bookmarks if the push failed (BC)
authorPierre-Yves David <pierre-yves.david@fb.com>
Fri, 15 Aug 2014 18:26:21 -0700
changeset 22228 a3dc2d385490
parent 22227 98cbd41cb532
child 22229 3a7b45a0bd20
pushbookmark: do not attempt to update bookmarks if the push failed (BC) Before this patch, there was always an attempt to update bookmark even if prior steps of the push failed. I cannot see a good semantic reason to do so. We disable this possibility to simplify the push flow with bundle2. Bookmarks will be included in the bundle and fail with other steps.
mercurial/exchange.py
--- a/mercurial/exchange.py	Fri Aug 15 17:58:15 2014 -0700
+++ b/mercurial/exchange.py	Fri Aug 15 18:26:21 2014 -0700
@@ -613,6 +613,8 @@
 
 def _pushbookmark(pushop):
     """Update bookmark position on remote"""
+    if pushop.ret == 0:
+        return
     ui = pushop.ui
     repo = pushop.repo.unfiltered()
     remote = pushop.remote