Mercurial > hg > evolve
changeset 2534:31e219996737
merge back with stable (post-release)
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 19 May 2017 00:10:12 +0200 |
parents | 48f03698304a (diff) 0f101ca4b09a (current diff) |
children | f7d67b6ee44f |
files | tests/test-discovery-obshashrange.t |
diffstat | 10 files changed, 70 insertions(+), 62 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgtags +++ b/.hgtags @@ -49,3 +49,4 @@ 165ad227993de4e7d819cc6c820d5b9f7b38b80d 6.0.0 5ef112a6eb875633a7925cde61b7d2d9e65b3a56 6.0.1 8510d3fd7c3b312dc731f4c29badc415d504558a 6.1.0 +d4ee0274a8efbaf3d73a659998248c379c61c2bf 6.2.0
--- a/README +++ b/README @@ -112,25 +112,22 @@ Changelog ========= -6.2.0 - in progress +6.2.0 -- 2017-05-18 ------------------- - - olog: turn into a proper command to inspect the obs-history of a changeset + - olog: a new command to inspect the obs-history of a changeset (hg-4.0 + only), - topic: have thg display topic name if possible, + - blackbox: log more information about discovery and cache computation, - obscache: more efficient update in the (rare) case of a transaction adding - - blackbox: log more information about discovery and cache computation. - markers without changesets + markers without changesets, + - obscache: fix more cache invalidation propagation, + - obscache: also enable the new cache (from 6.1.0) for 'evolve.server-only', - obshashrange-cache: update incrementally in the (common) case of a transaction not affecting existing range, - obshashrange-cache: keep the cache warm after each transaction, - -6.1.1 - in progress -------------------- - - - also enable the new cache (from 6.1.0) for 'evolve.server-only', - - fix hg stack json output to be valid json - - stack: now display if current revision is in bad state (issue5533) - - obscache: fix more cache invalidation propagation + - topic: now requires Mercurial 4.0 or above, + - stack: now display if current revision is in bad state (issue5533), + - stack: fix json output to be valid json. 6.1.0 -- 2017-05-03 -------------------
--- a/debian/changelog +++ b/debian/changelog @@ -1,20 +1,26 @@ +mercurial-evolve (6.2.0-1) unstable; urgency=medium + + * new upstream release + + -- Pierre-Yves David <pierre-yves.david@ens-lyon.org> Thu, 18 May 2017 22:24:10 +0200 + mercurial-evolve (6.1.0-1) unstable; urgency=medium * New upstream release - -- Pierre-Yves David <marmoute@nodosa.octopoid.net> Wed, 03 May 2017 13:57:15 +0200 + -- Pierre-Yves David <pierre-yves.david@ens-lyon.org> Wed, 03 May 2017 13:57:15 +0200 mercurial-evolve (6.0.1-1) unstable; urgency=medium * New upstream version - -- Pierre-Yves David <marmoute@nodosa.octopoid.net> Thu, 20 Apr 2017 12:58:35 +0200 + -- Pierre-Yves David <pierre-yves.david@ens-lyon.org> Thu, 20 Apr 2017 12:58:35 +0200 mercurial-evolve (6.0.0-1) unstable; urgency=medium * New Upstream Release - -- Pierre-Yves David <marmoute@nodosa.octopoid.net> Thu, 20 Apr 2017 12:58:03 +0200 + -- Pierre-Yves David <pierre-yves.david@ens-lyon.org> Thu, 20 Apr 2017 12:58:03 +0200 mercurial-evolve (5.5.0-1) unstable; urgency=medium
--- a/hgext3rd/evolve/metadata.py +++ b/hgext3rd/evolve/metadata.py @@ -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.0.dev' +__version__ = '6.2.1.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/obscache.py +++ b/hgext3rd/evolve/obscache.py @@ -7,16 +7,19 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. +import errno import hashlib +import os import struct +import time import weakref -import errno from mercurial import ( error, localrepo, obsolete, phases, + pycompat, node, util, ) @@ -29,6 +32,17 @@ eh = exthelper.exthelper() +# prior to hg-4.2 there are not util.timer +if util.safehasattr(util, 'timer'): + timer = util.timer +elif util.safehasattr(time, "perf_counter"): + timer = time.perf_counter +elif getattr(pycompat, 'osname', os.name) == 'nt': + timer = time.clock +else: + timer = time.time + + try: obsstorefilecache = localrepo.localrepository.obsstore except AttributeError: @@ -209,9 +223,9 @@ repo.ui.log('evoext-cache', 'strip detected, %s cache reset\n' % self._cachename) self.clear(reset=True) - starttime = util.timer() + starttime = timer() self._updatefrom(repo, revs, obsmarkers) - duration = util.timer() - starttime + duration = timer() - starttime repo.ui.log('evoext-cache', 'updated %s in %.4f seconds (%sr, %so)\n', self._cachename, duration, len(revs), len(obsmarkers))
--- a/hgext3rd/evolve/obsdiscovery.py +++ b/hgext3rd/evolve/obsdiscovery.py @@ -24,8 +24,10 @@ import hashlib import heapq +import os import sqlite3 import struct +import time import weakref from mercurial import ( @@ -36,6 +38,7 @@ localrepo, node, obsolete, + pycompat, scmutil, setdiscovery, util, @@ -51,6 +54,16 @@ stablerange, ) +# prior to hg-4.2 there are not util.timer +if util.safehasattr(util, 'timer'): + timer = util.timer +elif util.safehasattr(time, "perf_counter"): + timer = time.perf_counter +elif getattr(pycompat, 'osname', os.name) == 'nt': + timer = time.clock +else: + timer = time.time + _pack = struct.pack _unpack = struct.unpack _calcsize = struct.calcsize @@ -215,7 +228,7 @@ initialsamplesize=100, fullsamplesize=200): missing = set() - starttime = util.timer() + starttime = timer() heads = local.revs('heads(%ld)', probeset) local.stablerange.warmup(local) @@ -303,7 +316,7 @@ ui.progress(_("comparing obsmarker with other"), querycount) ui.progress(_("comparing obsmarker with other"), None) local.obsstore.rangeobshashcache.save(local) - duration = util.timer() - starttime + duration = timer() - starttime logmsg = ('obsdiscovery, %d/%d mismatch' ' - %d obshashrange queries in %.4f seconds\n') logmsg %= (len(missing), len(probeset), querycount, duration)
--- a/hgext3rd/evolve/stablerange.py +++ b/hgext3rd/evolve/stablerange.py @@ -10,7 +10,9 @@ import collections import heapq import math +import os import sqlite3 +import time import weakref from mercurial import ( @@ -19,6 +21,7 @@ error, localrepo, node as nodemod, + pycompat, scmutil, util, ) @@ -31,6 +34,16 @@ eh = exthelper.exthelper() +# prior to hg-4.2 there are not util.timer +if util.safehasattr(util, 'timer'): + timer = util.timer +elif util.safehasattr(time, "perf_counter"): + timer = time.perf_counter +elif getattr(pycompat, 'osname', os.name) == 'nt': + timer = time.clock +else: + timer = time.time + ################################## ### Stable topological sorting ### ################################## @@ -263,7 +276,7 @@ # # we use the revnumber as an approximation for depth ui = repo.ui - starttime = util.timer() + starttime = timer() if upto is None: upto = len(cl) - 1 @@ -309,7 +322,7 @@ self._tiprev = upto self._tipnode = cl.node(upto) - duration = util.timer() - starttime + duration = timer() - starttime repo.ui.log('evoext-cache', 'updated stablerange cache in %.4f seconds\n', duration)
--- a/hgext3rd/topic/__init__.py +++ b/hgext3rd/topic/__init__.py @@ -106,7 +106,7 @@ 'topic.active': 'green', } -testedwith = '3.9' +testedwith = '4.0.2 4.1.3 4.2' def _contexttopic(self): return self.extra().get(constants.extrakey, '')
--- a/tests/test-discovery-obshashrange.t +++ b/tests/test-discovery-obshashrange.t @@ -20,7 +20,7 @@ > EOF $ getid() { - > hg log --hidden --template '{node}\n' --rev "$1" + > hg log --hidden --template '{node}\n' --rev "$1" --config 'extensions.blackbox=!' > } $ hg init server @@ -75,41 +75,30 @@ * @0000000000000000000000000000000000000000 (*)> log -G (glob) * @0000000000000000000000000000000000000000 (*)> writing .hg/cache/tags2-visible with 0 tags (glob) * @0000000000000000000000000000000000000000 (*)> log -G exited 0 after *.?? seconds (glob) - * @0000000000000000000000000000000000000000 (*)> log --hidden --template '{node}\n' --rev 'desc(r1)' (glob) - * @0000000000000000000000000000000000000000 (*)> writing .hg/cache/tags2 with 0 tags (glob) - * @0000000000000000000000000000000000000000 (*)> log --hidden --template '{node}\n' --rev 'desc(r1)' exited 0 after *.?? seconds (glob) * @0000000000000000000000000000000000000000 (*)> debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 66f7d451a68b85ed82ff5fcc254daf50c74144bd (glob) * @0000000000000000000000000000000000000000 (*)> alias 'debugobsolete' expands to 'debugobsolete -d '0 0'' (glob) * @0000000000000000000000000000000000000000 (*)> obshashcache reset - new markers affect cached ranges (glob) * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obshashrange in *.???? seconds (0r, 1o) (glob) * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obscache in *.???? seconds (0r, 1o) (glob) * @0000000000000000000000000000000000000000 (*)> debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 66f7d451a68b85ed82ff5fcc254daf50c74144bd exited 0 after *.?? seconds (glob) - * @0000000000000000000000000000000000000000 (*)> log --hidden --template '{node}\n' --rev 'desc(r2)' (glob) - * @0000000000000000000000000000000000000000 (*)> log --hidden --template '{node}\n' --rev 'desc(r2)' exited 0 after *.?? seconds (glob) * @0000000000000000000000000000000000000000 (*)> debugobsolete bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 01241442b3c2bf3211e593b549c655ea65b295e3 (glob) * @0000000000000000000000000000000000000000 (*)> alias 'debugobsolete' expands to 'debugobsolete -d '0 0'' (glob) * @0000000000000000000000000000000000000000 (*)> obshashcache reset - new markers affect cached ranges (glob) * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obshashrange in *.???? seconds (0r, 1o) (glob) * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obscache in *.???? seconds (0r, 1o) (glob) * @0000000000000000000000000000000000000000 (*)> debugobsolete bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 01241442b3c2bf3211e593b549c655ea65b295e3 exited 0 after *.?? seconds (glob) - * @0000000000000000000000000000000000000000 (*)> log --hidden --template '{node}\n' --rev 'desc(r4)' (glob) - * @0000000000000000000000000000000000000000 (*)> log --hidden --template '{node}\n' --rev 'desc(r4)' exited 0 after *.?? seconds (glob) * @0000000000000000000000000000000000000000 (*)> debugobsolete cccccccccccccccccccccccccccccccccccccccc bebd167eb94d257ace0e814aeb98e6972ed2970d (glob) * @0000000000000000000000000000000000000000 (*)> alias 'debugobsolete' expands to 'debugobsolete -d '0 0'' (glob) * @0000000000000000000000000000000000000000 (*)> obshashcache reset - new markers affect cached ranges (glob) * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obshashrange in *.???? seconds (0r, 1o) (glob) * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obscache in *.???? seconds (0r, 1o) (glob) * @0000000000000000000000000000000000000000 (*)> debugobsolete cccccccccccccccccccccccccccccccccccccccc bebd167eb94d257ace0e814aeb98e6972ed2970d exited 0 after *.?? seconds (glob) - * @0000000000000000000000000000000000000000 (*)> log --hidden --template '{node}\n' --rev 'desc(r5)' (glob) - * @0000000000000000000000000000000000000000 (*)> log --hidden --template '{node}\n' --rev 'desc(r5)' exited 0 after *.?? seconds (glob) * @0000000000000000000000000000000000000000 (*)> debugobsolete dddddddddddddddddddddddddddddddddddddddd c8d03c1b5e94af74b772900c58259d2e08917735 (glob) * @0000000000000000000000000000000000000000 (*)> alias 'debugobsolete' expands to 'debugobsolete -d '0 0'' (glob) * @0000000000000000000000000000000000000000 (*)> obshashcache reset - new markers affect cached ranges (glob) * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obshashrange in *.???? seconds (0r, 1o) (glob) * @0000000000000000000000000000000000000000 (*)> updated evo-ext-obscache in *.???? seconds (0r, 1o) (glob) * @0000000000000000000000000000000000000000 (*)> debugobsolete dddddddddddddddddddddddddddddddddddddddd c8d03c1b5e94af74b772900c58259d2e08917735 exited 0 after *.?? seconds (glob) - * @0000000000000000000000000000000000000000 (*)> log --hidden --template '{node}\n' --rev 'desc(r7)' (glob) - * @0000000000000000000000000000000000000000 (*)> log --hidden --template '{node}\n' --rev 'desc(r7)' exited 0 after *.?? seconds (glob) * @0000000000000000000000000000000000000000 (*)> debugobsolete eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee 4de32a90b66cd083ebf3c00b41277aa7abca51dd (glob) * @0000000000000000000000000000000000000000 (*)> alias 'debugobsolete' expands to 'debugobsolete -d '0 0'' (glob) * @0000000000000000000000000000000000000000 (*)> obshashcache reset - new markers affect cached ranges (glob) @@ -315,8 +304,6 @@ * @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 (*)> log --hidden --template '{node}\n' --rev . (glob) - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> log --hidden --template '{node}\n' --rev . exited 0 after *.?? seconds (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobsolete ffffffffffffffffffffffffffffffffffffffff 45f8b879de922f6a6e620ba04205730335b6fc7e (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> alias 'debugobsolete' expands to 'debugobsolete -d '0 0'' (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obshashcache reset - new markers affect cached ranges (glob) @@ -330,17 +317,12 @@ * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> log -G (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> writing .hg/cache/tags2-visible with 0 tags (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> log -G exited 0 after *.?? seconds (glob) - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> log --hidden --template '{node}\n' --rev 'desc(r1)' (glob) - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> writing .hg/cache/tags2 with 0 tags (glob) - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> log --hidden --template '{node}\n' --rev 'desc(r1)' exited 0 after *.?? seconds (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobsolete 111111111111111aaaaaaaaa1111111111111111 66f7d451a68b85ed82ff5fcc254daf50c74144bd (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> alias 'debugobsolete' expands to 'debugobsolete -d '0 0'' (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obshashcache reset - new markers affect cached ranges (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obshashrange in *.???? seconds (0r, 1o) (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated evo-ext-obscache in *.???? seconds (0r, 1o) (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobsolete 111111111111111aaaaaaaaa1111111111111111 66f7d451a68b85ed82ff5fcc254daf50c74144bd exited 0 after *.?? seconds (glob) - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> log --hidden --template '{node}\n' --rev 'desc(r3)' (glob) - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> log --hidden --template '{node}\n' --rev 'desc(r3)' exited 0 after *.?? seconds (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobsolete 22222222222222222bbbbbbbbbbbbb2222222222 2dc09a01254db841290af0538aa52f6f52c776e3 (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> alias 'debugobsolete' expands to 'debugobsolete -d '0 0'' (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obshashcache reset - new markers affect cached ranges (glob) @@ -426,10 +408,6 @@ * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobsolete exited 0 after *.?? seconds (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> log -G (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> log -G exited 0 after *.?? seconds (glob) - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> log --hidden --template '{node}\n' --rev 'desc(r1)' (glob) - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> log --hidden --template '{node}\n' --rev 'desc(r1)' exited 0 after *.?? seconds (glob) - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> log --hidden --template '{node}\n' --rev 'desc(r4)' (glob) - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> log --hidden --template '{node}\n' --rev 'desc(r4)' exited 0 after *.?? seconds (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> pull -r 6 (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obsdiscovery, 2/6 mismatch - 1 obshashrange queries in *.???? seconds (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> updated stablerange cache in *.???? seconds (glob) @@ -509,13 +487,6 @@ * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobsolete --rev '::6' exited 0 after *.?? seconds (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev 'heads(all())' (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> debugobshashrange --subranges --rev 'heads(all())' exited 0 after *.?? seconds (glob) - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> log --hidden --template '{node}\n' --rev 'desc(r1)' (glob) - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> writing .hg/cache/tags2 with 0 tags (glob) - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> log --hidden --template '{node}\n' --rev 'desc(r1)' exited 0 after *.?? seconds (glob) - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> log --hidden --template '{node}\n' --rev 'desc(r3)' (glob) - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> log --hidden --template '{node}\n' --rev 'desc(r3)' exited 0 after *.?? seconds (glob) - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> log --hidden --template '{node}\n' --rev 'desc(r6)' (glob) - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> log --hidden --template '{node}\n' --rev 'desc(r6)' exited 0 after *.?? seconds (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> pull -r f69452c5b1af6cbaaa56ef50cf94fff5bcc6ca23 (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obsdiscovery, 2/7 mismatch - 1 obshashrange queries in *.???? seconds (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obshashcache reset - new markers affect cached ranges (glob) @@ -538,10 +509,6 @@ OBSEXC: request obsmarkers for 1 common nodes 1 new obsolescence markers $ hg blackbox - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> log --hidden --template '{node}\n' --rev 'desc(foo)' (glob) - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> log --hidden --template '{node}\n' --rev 'desc(foo)' exited 0 after *.?? seconds (glob) - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> log --hidden --template '{node}\n' --rev 'desc(r4)' (glob) - * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> log --hidden --template '{node}\n' --rev 'desc(r4)' exited 0 after *.?? seconds (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> pull -r bebd167eb94d257ace0e814aeb98e6972ed2970d (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obsdiscovery, 1/5 mismatch - 1 obshashrange queries in *.???? seconds (glob) * @45f8b879de922f6a6e620ba04205730335b6fc7e (*)> obshashcache reset - new markers affect cached ranges (glob)
--- a/tests/test-evolve.t +++ b/tests/test-evolve.t @@ -769,7 +769,7 @@ Test olog - $ hg olog | head -n 13 # hg touch makes the output unstable (fix it with devel option for more stable touch) + $ hg olog | head -n 10 # hg touch makes the output unstable (fix it with devel option for more stable touch) @ d26d339c513f (12) add 4 |\ x | af636757ce3b (11) add 3 @@ -780,9 +780,6 @@ | | | x ce341209337f (4) add 4 | | | rewritten by test (*) as d26d339c513f (glob) | | | - x | | 0b9e50c35132 (5) add 3 - | | | rewritten by test (*) as af636757ce3b (glob) - | | | Test obsstore stat