# HG changeset patch # User Pierre-Yves David # Date 1407544169 25200 # Node ID 70de12b7721a70ded53d87230b1920e396f1c929 # Parent 59bc29c84ce064f39dd7734739e13ed9c95fd145 evolve: re-introduce the "pushing 42 markers…" message Informing the user about marker behind pushed sounds a good idea. diff -r 59bc29c84ce0 -r 70de12b7721a hgext/evolve.py --- 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) diff -r 59bc29c84ce0 -r 70de12b7721a tests/test-corrupt.t --- a/tests/test-corrupt.t Fri Aug 08 17:16:29 2014 -0700 +++ b/tests/test-corrupt.t Fri Aug 08 17:29:29 2014 -0700 @@ -111,6 +111,7 @@ adding manifests adding file changes added 1 changesets with 2 changes to 2 files + pushing 2 markers (147 bytes) $ hg -R ../other verify checking changesets checking manifests diff -r 59bc29c84ce0 -r 70de12b7721a tests/test-obsolete.t --- a/tests/test-obsolete.t Fri Aug 08 17:16:29 2014 -0700 +++ b/tests/test-obsolete.t Fri Aug 08 17:29:29 2014 -0700 @@ -181,6 +181,7 @@ adding manifests adding file changes added 5 changesets with 5 changes to 5 files (+1 heads) + pushing 2 markers (123 bytes) $ hg -R ../other-new verify checking changesets checking manifests @@ -234,6 +235,7 @@ adding manifests adding file changes added 1 changesets with 1 changes to 1 files (+1 heads) + pushing 3 markers (184 bytes) $ qlog -R ../other-new 5 - 95de7fc6918d @@ -255,6 +257,7 @@ pushing to ../other-new searching for changes no changes found + pushing 3 markers (184 bytes) [1] $ hg up --hidden -q .^ # 3 @@ -529,6 +532,7 @@ adding manifests adding file changes added 2 changesets with 1 changes to [12] files (re) + pushing 7 markers (452 bytes) $ hg up -q 10 $ mkcommit "obsol_d'''" created new head @@ -540,6 +544,7 @@ adding manifests adding file changes added 1 changesets with 1 changes to 1 files (+1 heads) + pushing 8 markers (513 bytes) $ cd .. check bumped detection diff -r 59bc29c84ce0 -r 70de12b7721a tests/test-sharing.t --- a/tests/test-sharing.t Fri Aug 08 17:16:29 2014 -0700 +++ b/tests/test-sharing.t Fri Aug 08 17:29:29 2014 -0700 @@ -112,6 +112,7 @@ adding manifests adding file changes added 1 changesets with 1 changes to 1 files + pushing 4 markers (341 bytes) Figure SG05 $ hg -R ../public shortlog -G diff -r 59bc29c84ce0 -r 70de12b7721a tests/test-simple4server.t --- a/tests/test-simple4server.t Fri Aug 08 17:16:29 2014 -0700 +++ b/tests/test-simple4server.t Fri Aug 08 17:29:29 2014 -0700 @@ -90,6 +90,7 @@ remote: adding manifests remote: adding file changes remote: added 1 changesets with 1 changes to 1 files (+1 heads) + pushing 2 markers (171 bytes) $ hg push pushing to http://localhost:$HGPORT/ searching for changes diff -r 59bc29c84ce0 -r 70de12b7721a tests/test-tutorial.t --- a/tests/test-tutorial.t Fri Aug 08 17:16:29 2014 -0700 +++ b/tests/test-tutorial.t Fri Aug 08 17:29:29 2014 -0700 @@ -402,6 +402,7 @@ adding manifests adding file changes added 3 changesets with 3 changes to 1 files + pushing 6 markers (487 bytes) for simplicity sake we get the bathroom change in line again @@ -722,6 +723,7 @@ adding manifests adding file changes added 2 changesets with 2 changes to 1 files (+1 heads) + pushing 10 markers (803 bytes) remote get a warning that current working directory is based on an obsolete changeset diff -r 59bc29c84ce0 -r 70de12b7721a tests/test-wireproto.t --- a/tests/test-wireproto.t Fri Aug 08 17:16:29 2014 -0700 +++ b/tests/test-wireproto.t Fri Aug 08 17:29:29 2014 -0700 @@ -66,6 +66,7 @@ $ hg push pushing to ssh://user@dummy/server searching for changes + pushing 2 markers (171 bytes) remote: adding changesets remote: adding manifests remote: adding file changes