changeset 22228:a3dc2d385490

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.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Fri, 15 Aug 2014 18:26:21 -0700
parents 98cbd41cb532
children 3a7b45a0bd20
files mercurial/exchange.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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