Mercurial > evolve
changeset 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 |
files | hgext/evolve.py tests/test-corrupt.t tests/test-obsolete.t tests/test-sharing.t tests/test-simple4server.t tests/test-tutorial.t tests/test-wireproto.t |
diffstat | 7 files changed, 24 insertions(+), 6 deletions(-) [+] |
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)
--- 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
--- 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
--- 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
--- 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
--- 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
--- 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