diff hgext/evolve.py @ 1036:70de12b7721a

evolve: re-introduce the "pushing 42 markers…" message Informing the user about marker behind pushed sounds a good idea.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Fri, 08 Aug 2014 17:29:29 -0700
parents 59bc29c84ce0
children bddee73b361e
line wrap: on
line diff
--- a/hgext/evolve.py	Fri Aug 08 17:16:29 2014 -0700
+++ b/hgext/evolve.py	Fri Aug 08 17:29:29 2014 -0700
@@ -2225,9 +2225,12 @@
 ### Obsolescence marker exchange experimenation                   ###
 #####################################################################
 
-def obsexcmsg(ui, message):
-    if ui.configbool('experimental', 'verbose-obsolescence-exchange', False):
+def obsexcmsg(ui, message, important=False):
+    verbose = ui.configbool('experimental', 'verbose-obsolescence-exchange',
+                             False)
+    if verbose:
         message = 'OBSEXC: ' + message
+    if important or verbose:
         ui.status(message)
 
 def obsexcprg(ui, *args, **kwargs):
@@ -2401,7 +2404,8 @@
             obsdata.seek(0)
             obsdata.ui = repo.ui
             obsexcmsg(repo.ui, "pushing %i markers (%i bytes)\n"
-                               % (len(markers), len(obsdata.getvalue())))
+                               % (len(markers), len(obsdata.getvalue())),
+                      True)
             bundler.newpart('EVOLVE:B2X:OBSMARKERV1', data=obsdata)
             def callback(op):
                 obsexcprg(repo.ui, None)
@@ -2475,7 +2479,8 @@
             obsdata.seek(0)
             obsdata.ui = repo.ui
             obsexcmsg(repo.ui, "pushing %i markers (%i bytes)\n"
-                               % (len(markers), len(obsdata.getvalue())))
+                               % (len(markers), len(obsdata.getvalue())),
+                      True)
             bundler = bundle2.bundle20(pushop.ui, {})
             capsblob = bundle2.encodecaps(pushop.repo.bundle2caps)
             bundler.addpart(bundle2.bundlepart('b2x:replycaps', data=capsblob))
@@ -2497,7 +2502,8 @@
             obsdata.seek(0)
             obsdata.ui = repo.ui
             obsexcmsg(repo.ui, "pushing %i markers (%i bytes)\n"
-                               % (len(markers), len(obsdata.getvalue())))
+                               % (len(markers), len(obsdata.getvalue())),
+                      True)
             remote.evoext_pushobsmarkers_0(obsdata)
             obsexcprg(repo.ui, None)
         else:
@@ -2506,7 +2512,8 @@
             totalbytes = sum(len(d) for k,d in remotedata)
             sentbytes = 0
             obsexcmsg(repo.ui, "pushing %i markers in %i pushkey payload (%i bytes)\n"
-                                % (len(markers), len(remotedata), totalbytes))
+                                % (len(markers), len(remotedata), totalbytes),
+                      True)
             for key, data in remotedata:
                 obsexcprg(repo.ui, sentbytes, item=key, unit="bytes",
                           total=totalbytes)