changeset 25559:521c1a3139c9

push: only say we are trying to push obsmarkers when we actually try The message was issued unconditionally. Move it inside the `if` that actually tries to push obsmarkers.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Thu, 11 Jun 2015 13:02:21 -0700
parents daf9f7ee2a5c
children 2b2108c35bfc
files mercurial/exchange.py tests/test-acl.t
diffstat 2 files changed, 1 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/exchange.py	Fri May 29 13:25:34 2015 -0400
+++ b/mercurial/exchange.py	Thu Jun 11 13:02:21 2015 -0700
@@ -789,11 +789,11 @@
     """utility function to push obsolete markers to a remote"""
     if 'obsmarkers' in pushop.stepsdone:
         return
-    pushop.ui.debug('try to push obsolete markers to remote\n')
     repo = pushop.repo
     remote = pushop.remote
     pushop.stepsdone.add('obsmarkers')
     if pushop.outobsmarkers:
+        pushop.ui.debug('try to push obsolete markers to remote\n')
         rslts = []
         remotedata = obsolete._pushkeyescape(sorted(pushop.outobsmarkers))
         for key in sorted(remotedata, reverse=True):
--- a/tests/test-acl.t	Fri May 29 13:25:34 2015 -0400
+++ b/tests/test-acl.t	Thu Jun 11 13:02:21 2015 -0700
@@ -132,7 +132,6 @@
   bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported
   bundle2-input-bundle: 1 parts total
   listing keys for "phases"
-  try to push obsolete markers to remote
   repository tip rolled back to revision 0 (undo push)
   0:6675d58eff77
   
@@ -198,7 +197,6 @@
   bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported
   bundle2-input-bundle: 1 parts total
   listing keys for "phases"
-  try to push obsolete markers to remote
   repository tip rolled back to revision 0 (undo push)
   0:6675d58eff77
   
@@ -275,7 +273,6 @@
   bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported
   bundle2-input-bundle: 1 parts total
   listing keys for "phases"
-  try to push obsolete markers to remote
   repository tip rolled back to revision 0 (undo push)
   0:6675d58eff77
   
@@ -766,7 +763,6 @@
   bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported
   bundle2-input-bundle: 1 parts total
   listing keys for "phases"
-  try to push obsolete markers to remote
   repository tip rolled back to revision 0 (undo push)
   0:6675d58eff77
   
@@ -1085,7 +1081,6 @@
   bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported
   bundle2-input-bundle: 1 parts total
   listing keys for "phases"
-  try to push obsolete markers to remote
   repository tip rolled back to revision 0 (undo push)
   0:6675d58eff77
   
@@ -1172,7 +1167,6 @@
   bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported
   bundle2-input-bundle: 1 parts total
   listing keys for "phases"
-  try to push obsolete markers to remote
   repository tip rolled back to revision 0 (undo push)
   0:6675d58eff77
   
@@ -1332,7 +1326,6 @@
   bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported
   bundle2-input-bundle: 1 parts total
   listing keys for "phases"
-  try to push obsolete markers to remote
   repository tip rolled back to revision 0 (undo push)
   0:6675d58eff77
   
@@ -1539,7 +1532,6 @@
   bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported
   bundle2-input-bundle: 2 parts total
   listing keys for "phases"
-  try to push obsolete markers to remote
   repository tip rolled back to revision 2 (undo push)
   2:fb35475503ef
   
@@ -1836,7 +1828,6 @@
   bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported
   bundle2-input-bundle: 2 parts total
   listing keys for "phases"
-  try to push obsolete markers to remote
   repository tip rolled back to revision 2 (undo push)
   2:fb35475503ef
   
@@ -1930,7 +1921,6 @@
   bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported
   bundle2-input-bundle: 2 parts total
   listing keys for "phases"
-  try to push obsolete markers to remote
   repository tip rolled back to revision 2 (undo push)
   2:fb35475503ef
   
@@ -2092,7 +2082,6 @@
   bundle2-input-part: "reply:pushkey" (params: 0 advisory) supported
   bundle2-input-bundle: 2 parts total
   listing keys for "phases"
-  try to push obsolete markers to remote
   repository tip rolled back to revision 2 (undo push)
   2:fb35475503ef