Mercurial > evolve
changeset 2445:07c5c79fc3d9
merge back with stable
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 19 May 2017 18:07:56 +0200 |
parents | 29fd3eec625c (diff) 6a23a55f77d2 (current diff) |
children | 4b2f4da124a2 |
files | README tests/test-prune.t |
diffstat | 8 files changed, 82 insertions(+), 46 deletions(-) [+] |
line wrap: on
line diff
--- a/README Fri May 19 17:34:45 2017 +0200 +++ b/README Fri May 19 18:07:56 2017 +0200 @@ -112,6 +112,11 @@ Changelog ========= +6.3.0 - in progress +------------------- + + - olog: add an 'obslog' alias + 6.2.1 - in progress -------------------
--- a/hgext3rd/evolve/debugcmd.py Fri May 19 17:34:45 2017 +0200 +++ b/hgext3rd/evolve/debugcmd.py Fri May 19 18:07:56 2017 +0200 @@ -10,7 +10,10 @@ # * We could have the same code in core as `hg debugobsolete --stat`, # * We probably want a way for the extension to hook in for extra data. -from mercurial import node +from mercurial import ( + obsolete, + node, +) from mercurial.i18n import _ @@ -41,7 +44,8 @@ store = repo.obsstore unfi = repo.unfiltered() nm = unfi.changelog.nodemap - ui.write(_('markers total: %9i\n') % len(store._all)) + nbmarkers = len(store._all) + ui.write(_('markers total: %9i\n') % nbmarkers) sucscount = [0, 0, 0, 0] known = 0 parentsdata = 0 @@ -51,6 +55,8 @@ clustersmap = {} # same data using parent information pclustersmap = {} + size_v0 = [] + size_v1 = [] for mark in store: if mark[0] in nm: known += 1 @@ -72,6 +78,8 @@ # same with parent data nodes.update(parents) _updateclustermap(nodes, mark, pclustersmap) + size_v0.append(len(obsolete._fm0encodeonemarker(mark))) + size_v1.append(len(obsolete._fm1encodeonemarker(mark))) # freezing the result for c in clustersmap.values(): @@ -95,6 +103,27 @@ for key in sorted(metakeys): ui.write((' %15s: %9i\n' % (key, metakeys[key]))) + size_v0.sort() + size_v1.sort() + if size_v0: + ui.write('marker size:\n') + # format v1 + ui.write(' format v1:\n') + ui.write((' smallest length: %9i\n' % size_v1[0])) + ui.write((' longer length: %9i\n' % size_v1[-1])) + median = size_v1[nbmarkers // 2] + ui.write((' median length: %9i\n' % median)) + mean = sum(size_v1) // nbmarkers + ui.write((' mean length: %9i\n' % mean)) + # format v0 + ui.write(' format v0:\n') + ui.write((' smallest length: %9i\n' % size_v0[0])) + ui.write((' longer length: %9i\n' % size_v0[-1])) + median = size_v0[nbmarkers // 2] + ui.write((' median length: %9i\n' % median)) + mean = sum(size_v0) // nbmarkers + ui.write((' mean length: %9i\n' % mean)) + allclusters = list(set(clustersmap.values())) allclusters.sort(key=lambda x: len(x[1])) ui.write(('disconnected clusters: %9i\n' % len(allclusters)))
--- a/hgext3rd/evolve/metadata.py Fri May 19 17:34:45 2017 +0200 +++ b/hgext3rd/evolve/metadata.py Fri May 19 18:07:56 2017 +0200 @@ -5,7 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. -__version__ = '6.2.1.dev' +__version__ = '6.3.0.dev' testedwith = '3.8.4 3.9.2 4.0.2 4.1.2 4.2' minimumhgversion = '3.8' buglink = 'https://bz.mercurial-scm.org/'
--- a/hgext3rd/evolve/obshistory.py Fri May 19 17:34:45 2017 +0200 +++ b/hgext3rd/evolve/obshistory.py Fri May 19 18:07:56 2017 +0200 @@ -25,7 +25,7 @@ eh = exthelper.exthelper() @eh.command( - 'olog', + 'obslog|olog', [('G', 'graph', True, _("show the revision DAG")), ('r', 'rev', [], _('show the specified revision or revset'), _('REV')) ] + commands.formatteropts,
--- a/tests/test-discovery-obshashrange.t Fri May 19 17:34:45 2017 +0200 +++ b/tests/test-discovery-obshashrange.t Fri May 19 18:07:56 2017 +0200 @@ -34,24 +34,10 @@ * @0000000000000000000000000000000000000000 (*)> serve --stdio (glob) * @0000000000000000000000000000000000000000 (*)> -R server serve --stdio exited 0 after *.?? seconds (glob) * @0000000000000000000000000000000000000000 (*)> debugbuilddag .+7 (glob) - * @0000000000000000000000000000000000000000 (*)> updated served branch cache in *.???? seconds (glob) - * @0000000000000000000000000000000000000000 (*)> wrote served branch cache with 1 labels and 1 nodes (glob) - * @0000000000000000000000000000000000000000 (*)> updated served branch cache in *.???? seconds (glob) - * @0000000000000000000000000000000000000000 (*)> wrote served branch cache with 1 labels and 1 nodes (glob) - * @0000000000000000000000000000000000000000 (*)> updated served branch cache in *.???? seconds (glob) - * @0000000000000000000000000000000000000000 (*)> wrote served branch cache with 1 labels and 1 nodes (glob) + * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obshashrange in *.???? seconds (8r, 0o) (glob) + * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obscache in *.???? seconds (8r, 0o) (glob) * @0000000000000000000000000000000000000000 (*)> updated served branch cache in *.???? seconds (glob) * @0000000000000000000000000000000000000000 (*)> wrote served branch cache with 1 labels and 1 nodes (glob) - * @0000000000000000000000000000000000000000 (*)> updated served branch cache in *.???? seconds (glob) - * @0000000000000000000000000000000000000000 (*)> wrote served branch cache with 1 labels and 1 nodes (glob) - * @0000000000000000000000000000000000000000 (*)> updated served branch cache in *.???? seconds (glob) - * @0000000000000000000000000000000000000000 (*)> wrote served branch cache with 1 labels and 1 nodes (glob) - * @0000000000000000000000000000000000000000 (*)> updated served branch cache in *.???? seconds (glob) - * @0000000000000000000000000000000000000000 (*)> wrote served branch cache with 1 labels and 1 nodes (glob) - * @0000000000000000000000000000000000000000 (*)> updated served branch cache in *.???? seconds (glob) - * @0000000000000000000000000000000000000000 (*)> wrote served branch cache with 1 labels and 1 nodes (glob) - * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obshashrange in *.???? seconds (8r, 0o) (glob) - * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obscache in *.???? seconds (8r, 0o) (glob) * @0000000000000000000000000000000000000000 (*)> debugbuilddag .+7 exited 0 after *.?? seconds (glob) * @0000000000000000000000000000000000000000 (*)> blackbox (glob) $ rm .hg/blackbox.log @@ -170,11 +156,11 @@ $ rm ../server/.hg/blackbox.log $ hg blackbox * @0000000000000000000000000000000000000000 (*)> pull --rev 4 (glob) - * @0000000000000000000000000000000000000000 (*)> updated served branch cache in *.???? seconds (glob) - * @0000000000000000000000000000000000000000 (*)> wrote served branch cache with 1 labels and 1 nodes (glob) * @0000000000000000000000000000000000000000 (*)> updated stablerange cache in *.???? seconds (glob) * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obshashrange in *.???? seconds (5r, 3o) (glob) * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obscache in *.???? seconds (5r, 3o) (glob) + * @0000000000000000000000000000000000000000 (*)> updated base branch cache in *.???? seconds (glob) + * @0000000000000000000000000000000000000000 (*)> wrote base branch cache with 1 labels and 1 nodes (glob) * @0000000000000000000000000000000000000000 (*)> 5 incoming changes - new heads: bebd167eb94d (glob) * @0000000000000000000000000000000000000000 (*)> pull --rev 4 exited 0 after *.?? seconds (glob) * @0000000000000000000000000000000000000000 (*)> blackbox (glob) @@ -252,12 +238,11 @@ received listkey for "phases": 58 bytes $ hg -R ../server blackbox * @0000000000000000000000000000000000000000 (*)> serve --stdio (glob) - * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obscache in *.???? seconds (1r, 0o) (glob) + * @0000000000000000000000000000000000000000 (*)> updated stablerange cache in *.???? seconds (glob) + * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obshashrange in *.???? seconds (1r, 1o) (glob) + * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obscache in *.???? seconds (1r, 1o) (glob) * @0000000000000000000000000000000000000000 (*)> updated served branch cache in *.???? seconds (glob) * @0000000000000000000000000000000000000000 (*)> wrote served branch cache with 1 labels and 2 nodes (glob) - * @0000000000000000000000000000000000000000 (*)> updated stablerange cache in *.???? seconds (glob) - * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obshashrange in *.???? seconds (1r, 1o) (glob) - * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obscache in *.???? seconds (0r, 1o) (glob) * @0000000000000000000000000000000000000000 (*)> 1 incoming changes - new heads: 45f8b879de92 (glob) * @0000000000000000000000000000000000000000 (*)> -R server serve --stdio exited 0 after *.?? seconds (glob) * @0000000000000000000000000000000000000000 (*)> blackbox (glob) @@ -314,10 +299,10 @@ * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> add foo (glob) * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> add foo exited 0 after *.?? seconds (glob) * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> commit -m foo (glob) - * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated evo-ext-obscache in *.???? seconds (1r, 0o) (glob) - * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated served branch cache in *.???? seconds (glob) - * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> wrote served branch cache with 1 labels and 1 nodes (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obshashrange in *.???? seconds (1r, 0o) (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obscache in *.???? seconds (1r, 0o) (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated served branch cache in *.???? seconds (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> wrote served branch cache with 1 labels and 1 nodes (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> commit -m foo exited 0 after *.?? seconds (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobsolete ffffffffffffffffffffffffffffffffffffffff 45f8b879de922f6a6e620ba04205730335b6fc7e (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> alias 'debugobsolete' expands to 'debugobsolete -d '0 0'' (glob) @@ -346,7 +331,7 @@ * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobsolete 22222222222222222bbbbbbbbbbbbb2222222222 2dc09a01254db841290af0538aa52f6f52c776e3 exited 0 after *.?? seconds (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> push (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obsdiscovery, 2/6 mismatch - 1 obshashrange queries in *.???? seconds (glob) - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> push exited True after *.?? seconds (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> push exited 1 after *.?? seconds (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> blackbox (glob) $ rm .hg/blackbox.log $ hg debugobsolete | sort @@ -425,13 +410,12 @@ * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> log -G exited 0 after *.?? seconds (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> pull -r 6 (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obsdiscovery, 2/6 mismatch - 1 obshashrange queries in *.???? seconds (glob) - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obscache in *.???? seconds (2r, 0o) (glob) - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated served branch cache in *.???? seconds (glob) - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> wrote served branch cache with 1 labels and 2 nodes (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated stablerange cache in *.???? seconds (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obshashcache reset - new markers affect cached ranges (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obshashrange in *.???? seconds (2r, 3o) (glob) - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obscache in *.???? seconds (0r, 3o) (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obscache in *.???? seconds (2r, 3o) (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated served branch cache in *.???? seconds (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> wrote served branch cache with 1 labels and 2 nodes (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> 2 incoming changes - new heads: f69452c5b1af (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> pull -r 6 exited 0 after *.?? seconds (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> blackbox (glob) @@ -571,12 +555,11 @@ * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev 'heads(all())' exited 0 after *.?? seconds (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> pull (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obsdiscovery, 0/8 mismatch - 1 obshashrange queries in *.???? seconds (glob) - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obscache in *.???? seconds (1r, 0o) (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated stablerange cache in *.???? seconds (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obshashrange in *.???? seconds (1r, 1o) (glob) + * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obscache in *.???? seconds (1r, 1o) (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated served branch cache in *.???? seconds (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> wrote served branch cache with 1 labels and 2 nodes (glob) - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated stablerange cache in *.???? seconds (glob) - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obshashrange in *.???? seconds (1r, 1o) (glob) - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obscache in *.???? seconds (0r, 1o) (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> 1 incoming changes - new heads: 4de32a90b66c (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> pull exited 0 after *.?? seconds (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> rollback (glob) @@ -621,11 +604,8 @@ * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev 'heads(all())' exited 0 after *.?? seconds (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> pull (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obsdiscovery, 0/8 mismatch - 1 obshashrange queries in *.???? seconds (glob) - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> strip detected, evo-ext-obscache cache reset (glob) - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obscache in *.???? seconds (9r, 12o) (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated stablerange cache in *.???? seconds (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obshashrange in *.???? seconds (1r, 1o) (glob) - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obscache in *.???? seconds (0r, 1o) (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> 1 incoming changes - new heads: 4de32a90b66c (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> pull exited 0 after *.?? seconds (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> blackbox (glob) @@ -747,11 +727,11 @@ * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> log -G exited 0 after *.?? seconds (glob) * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> pull (glob) * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> obsdiscovery, 0/8 mismatch - 1 obshashrange queries in *.???? seconds (glob) - * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated evo-ext-obscache in *.???? seconds (1r, 0o) (glob) * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated stablerange cache in *.???? seconds (glob) * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated evo-ext-obshashrange in *.???? seconds (1r, 0o) (glob) - * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated served branch cache in *.???? seconds (glob) - * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> wrote served branch cache with 1 labels and 2 nodes (glob) + * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated evo-ext-obscache in *.???? seconds (1r, 0o) (glob) + * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> updated base branch cache in *.???? seconds (glob) + * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> wrote base branch cache with 1 labels and 2 nodes (glob) * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> 1 incoming changes - new heads: 45f8b879de92 (glob) * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> pull exited 0 after *.?? seconds (glob) * @bebd167eb94d257ace0e814aeb98e6972ed2970d (*)> log -G (glob)
--- a/tests/test-evolve-obshistory.t Fri May 19 17:34:45 2017 +0200 +++ b/tests/test-evolve-obshistory.t Fri May 19 18:07:56 2017 +0200 @@ -59,7 +59,7 @@ x 471f378eab4c (1) A0 rewritten by test (*20*) as 4ae3a4151de9 (glob) - $ hg olog 4ae3a4151de9 --no-graph -Tjson | python -m json.tool + $ hg obslog 4ae3a4151de9 --no-graph -Tjson | python -m json.tool [ { "debugobshistory.markers": [], @@ -86,7 +86,7 @@ "debugobshistory.shortdescription": "A0" } ] - $ hg olog --hidden 471f378eab4c + $ hg obslog --hidden 471f378eab4c x 471f378eab4c (1) A0 rewritten by test (*20*) as 4ae3a4151de9 (glob)
--- a/tests/test-evolve.t Fri May 19 17:34:45 2017 +0200 +++ b/tests/test-evolve.t Fri May 19 18:07:56 2017 +0200 @@ -793,6 +793,17 @@ more than 2 successors: 0 available keys: user: 10 + marker size: + format v1: + smallest length: 69 + longer length: 69 + median length: 69 + mean length: 69 + format v0: + smallest length: * (glob) + longer length: * (glob) + median length: * (glob) + mean length: * (glob) disconnected clusters: 1 any known node: 1 smallest length: 10
--- a/tests/test-prune.t Fri May 19 17:34:45 2017 +0200 +++ b/tests/test-prune.t Fri May 19 18:07:56 2017 +0200 @@ -354,6 +354,17 @@ more than 2 successors: 0 available keys: user: 7 + marker size: + format v1: + smallest length: 69 + longer length: 69 + median length: 69 + mean length: 69 + format v0: + smallest length: * (glob) + longer length: * (glob) + median length: * (glob) + mean length: * (glob) disconnected clusters: 7 any known node: 7 smallest length: 1