--- a/.hgtags Mon Jun 05 10:21:38 2017 +0100
+++ b/.hgtags Wed Jun 07 01:38:48 2017 +0100
@@ -52,3 +52,4 @@
d4ee0274a8efbaf3d73a659998248c379c61c2bf 6.2.0
0af99106b0754426913b5c82fb52dc70d4d299f6 6.2.1
6da4ca7b3e4fc214a363a5cf723554f114b7f51e 6.3.0
+e358c0263e4629746a7c925429c951f67d4b02b1 6.3.1
--- a/README Mon Jun 05 10:21:38 2017 +0100
+++ b/README Wed Jun 07 01:38:48 2017 +0100
@@ -121,7 +121,13 @@
Changelog
=========
-6.3.1 - in progress
+6.3.2 - in progress
+-------------------
+
+ - effect flag: fix a small bug related to hidden changeset,
+ - obshashrange: install a '.max-revs' option see extension help for details
+
+6.3.1 -- 2017-06-01
-------------------
- also backport the "revelant-markers" fix when using "evolve.serveronly"
--- a/debian/changelog Mon Jun 05 10:21:38 2017 +0100
+++ b/debian/changelog Wed Jun 07 01:38:48 2017 +0100
@@ -1,3 +1,9 @@
+mercurial-evolve (6.3.1-1) unstable; urgency=medium
+
+ * new upstream release
+
+ -- Pierre-Yves David <pierre-yves.david@ens-lyon.org> Thu, 01 Jun 2017 16:25:26 +0200
+
mercurial-evolve (6.3.0-1) unstable; urgency=medium
* New upstream release
--- a/hgext3rd/evolve/__init__.py Mon Jun 05 10:21:38 2017 +0100
+++ b/hgext3rd/evolve/__init__.py Wed Jun 07 01:38:48 2017 +0100
@@ -53,11 +53,11 @@
Obsolescence Markers Discovery Experiment
=========================================
-We are experimenting with a new protocol to discover common markers during the
-local and remote repository. This experiment is still at an early stage but is
-already raising better result than the previous version when usable.
-
-Large" repositories (hundreds of thousand) are currently unsupported. Some key
+We are experimenting with a new protocol to discover common markers between
+local and remote repositories. This experiment is still at an early stage but
+is already raising better results than the previous version (when usable).
+
+"Large" repositories (hundreds of thousand) are currently unsupported. Some key
algorithm has a naive implementation with too agressive caching, creating
memory consumption issue (this will get fixed).
@@ -77,20 +77,25 @@
# (recommended 'yes' for server (default))
obshashrange.warm-cache = no
-It is recommended to enable the blackbox extension to gather useful
-data about the experiment. It is shipped with Mercurial so no extra
-install needed.
+It is recommended to enable the blackbox extension. It gather useful data about
+the experiment. It is shipped with Mercurial so no extra install are needed.
[extensions]
blackbox =
-Finally some extra option are available to help tame the experimental
+Finally some extra options are available to help tame the experimental
implementation of some of the algorithms:
[experimental]
# restrict cache size to reduce memory consumption
obshashrange.lru-size = 2000 # default is 2000
+ # automatically disable obshashrange related computation and capabilities
+ # if the repository has more than N revisions. This is meant to help large
+ # server deployement to enable the feature on smaller repositories while
+ # ensuring no large repository will get affected.
+ obshashrange.max-revs = 100000 # default is None
+
Effect Flag Experiment
======================
@@ -576,7 +581,7 @@
if reason == 'pruned':
solvemsg = _("use 'hg evolve' to update to its parent successor")
elif reason == 'diverged':
- debugcommand = "hg evolve -list --divergent"
+ debugcommand = "hg evolve --list --divergent"
basemsg = _("%s has diverged, use '%s' to resolve the issue")
solvemsg = basemsg % (shortnode, debugcommand)
elif reason == 'superseed':
--- a/hgext3rd/evolve/debugcmd.py Mon Jun 05 10:21:38 2017 +0100
+++ b/hgext3rd/evolve/debugcmd.py Wed Jun 07 01:38:48 2017 +0100
@@ -91,7 +91,10 @@
fc = (frozenset(c[0]), frozenset(c[1]))
for n in fc[0]:
pclustersmap[n] = fc
- ui.write((' for known precursors: %9i\n' % known))
+ numobs = len(unfi.revs('obsolete()'))
+ numtotal = len(unfi)
+ ui.write((' for known precursors: %9i' % known))
+ ui.write((' (%i/%i obsolete changesets)\n' % (numobs, numtotal)))
ui.write((' with parents data: %9i\n' % parentsdata))
# successors data
ui.write(('markers with no successors: %9i\n' % sucscount[0]))
--- a/hgext3rd/evolve/obsdiscovery.py Mon Jun 05 10:21:38 2017 +0100
+++ b/hgext3rd/evolve/obsdiscovery.py Wed Jun 07 01:38:48 2017 +0100
@@ -586,8 +586,7 @@
repo = reporef()
if repo is None:
return
- hasobshashrange = repo.ui.configbool('experimental',
- 'obshashrange', False)
+ hasobshashrange = _useobshashrange(repo)
hascachewarm = repo.ui.configbool('experimental',
'obshashrange.warm-cache',
True)
@@ -665,15 +664,22 @@
hashes = _obshashrange_v0(repo, ranges)
return wireproto.encodelist(hashes)
+def _useobshashrange(repo):
+ base = repo.ui.configbool('experimental', 'obshashrange', False)
+ if base:
+ maxrevs = repo.ui.configint('experimental', 'obshashrange.max-revs', None)
+ if maxrevs is not None and maxrevs < len(repo.unfiltered()):
+ base = False
+ return base
def _canobshashrange(local, remote):
- return (local.ui.configbool('experimental', 'obshashrange', False)
+ return (_useobshashrange(local)
and remote.capable('_evoext_obshashrange_v0'))
def _obshashrange_capabilities(orig, repo, proto):
"""wrapper to advertise new capability"""
caps = orig(repo, proto)
- enabled = repo.ui.configbool('experimental', 'obshashrange', False)
+ enabled = _useobshashrange(repo)
if obsolete.isenabled(repo, obsolete.exchangeopt) and enabled:
caps = caps.split()
caps.append('_evoext_obshashrange_v0')
--- a/hgext3rd/evolve/obshistory.py Mon Jun 05 10:21:38 2017 +0100
+++ b/hgext3rd/evolve/obshistory.py Wed Jun 07 01:38:48 2017 +0100
@@ -494,8 +494,14 @@
This is a first and basic implementation, with many shortcoming.
"""
- leftdiff = leftctx.diff(git=1)
- rightdiff = rightctx.diff(git=1)
+
+ # Leftctx or right ctx might be filtered, so we need to use the contexts
+ # with an unfiltered repository to safely compute the diff
+ leftunfi = leftctx._repo.unfiltered()[leftctx.rev()]
+ leftdiff = leftunfi.diff(git=1)
+ rightunfi = rightctx._repo.unfiltered()[rightctx.rev()]
+ rightdiff = rightunfi.diff(git=1)
+
left, right = (0, 0)
while None not in (left, right):
left = _getdifflines(leftdiff)
--- a/hgext3rd/evolve/stablerange.py Mon Jun 05 10:21:38 2017 +0100
+++ b/hgext3rd/evolve/stablerange.py Wed Jun 07 01:38:48 2017 +0100
@@ -948,6 +948,9 @@
if not repo.ui.configbool('experimental', 'obshashrange.warm-cache',
True):
return tr
+ maxrevs = self.ui.configint('experimental', 'obshashrange.max-revs', None)
+ if maxrevs is not None and maxrevs < len(self.unfiltered()):
+ return tr
reporef = weakref.ref(self)
def _warmcache(tr):
--- a/tests/test-discovery-obshashrange.t Mon Jun 05 10:21:38 2017 +0100
+++ b/tests/test-discovery-obshashrange.t Wed Jun 07 01:38:48 2017 +0100
@@ -60,7 +60,7 @@
$ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(r1)'`
- $ hg debugobsolete bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb `getid 'desc(r2)'`
+ $ hg debugobsolete bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb `getid 'desc(r2)'` --config experimental.obshashrange.max-revs=1
$ hg debugobsolete cccccccccccccccccccccccccccccccccccccccc `getid 'desc(r4)'`
$ hg debugobsolete dddddddddddddddddddddddddddddddddddddddd `getid 'desc(r5)'` --config experimental.obshashrange.warm-cache=0
$ hg debugobsolete eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee `getid 'desc(r7)'`
@@ -83,14 +83,12 @@
* @0000000000000000000000000000000000000000 (*)> debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 66f7d451a68b85ed82ff5fcc254daf50c74144bd 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 (*)> debugobsolete bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 01241442b3c2bf3211e593b549c655ea65b295e3 --config 'experimental.obshashrange.max-revs=1' 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-obshashrange in *.???? seconds (0r, 2o) (glob)
* @0000000000000000000000000000000000000000 (*)> updated evo-ext-obscache in *.???? seconds (0r, 1o) (glob)
* @0000000000000000000000000000000000000000 (*)> debugobsolete cccccccccccccccccccccccccccccccccccccccc bebd167eb94d257ace0e814aeb98e6972ed2970d exited 0 after *.?? seconds (glob)
* @0000000000000000000000000000000000000000 (*)> debugobsolete dddddddddddddddddddddddddddddddddddddddd c8d03c1b5e94af74b772900c58259d2e08917735 (glob)
--- a/tests/test-evolve-obshistory.t Mon Jun 05 10:21:38 2017 +0100
+++ b/tests/test-evolve-obshistory.t Wed Jun 07 01:38:48 2017 +0100
@@ -1035,7 +1035,7 @@
$ hg update --hidden 'desc(A0)'
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
working directory parent is obsolete! (471f378eab4c)
- (471f378eab4c has diverged, use 'hg evolve -list --divergent' to resolve the issue)
+ (471f378eab4c has diverged, use 'hg evolve --list --divergent' to resolve the issue)
Test output with amended + folded commit
========================================
--- a/tests/test-evolve-templates.t Mon Jun 05 10:21:38 2017 +0100
+++ b/tests/test-evolve-templates.t Wed Jun 07 01:38:48 2017 +0100
@@ -464,7 +464,7 @@
$ hg up 'desc(A0)' --hidden
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
working directory parent is obsolete! (471f378eab4c)
- (471f378eab4c has diverged, use 'hg evolve -list --divergent' to resolve the issue)
+ (471f378eab4c has diverged, use 'hg evolve --list --divergent' to resolve the issue)
Precursors template should show current revision as it is the working copy
$ hg tlog
--- a/tests/test-evolve.t Mon Jun 05 10:21:38 2017 +0100
+++ b/tests/test-evolve.t Wed Jun 07 01:38:48 2017 +0100
@@ -785,7 +785,7 @@
$ hg debugobsstorestat
markers total: 10
- for known precursors: 10
+ for known precursors: 10 (10/13 obsolete changesets)
with parents data: 0
markers with no successors: 0
1 successors: 10
--- a/tests/test-obsolete.t Mon Jun 05 10:21:38 2017 +0100
+++ b/tests/test-obsolete.t Wed Jun 07 01:38:48 2017 +0100
@@ -705,7 +705,7 @@
$ hg up --hidden 2
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
working directory parent is obsolete! (4538525df7e2)
- (4538525df7e2 has diverged, use 'hg evolve -list --divergent' to resolve the issue)
+ (4538525df7e2 has diverged, use 'hg evolve --list --divergent' to resolve the issue)
$ hg export 9468a5f5d8b2 | hg import -
applying patch from stdin
1 new unstable changesets
--- a/tests/test-prune.t Mon Jun 05 10:21:38 2017 +0100
+++ b/tests/test-prune.t Wed Jun 07 01:38:48 2017 +0100
@@ -346,7 +346,7 @@
$ hg debugobsstorestat
markers total: 7
- for known precursors: 7
+ for known precursors: 7 (7/15 obsolete changesets)
with parents data: [04] (re)
markers with no successors: 7
1 successors: 0
--- a/tests/test-uncommit.t Mon Jun 05 10:21:38 2017 +0100
+++ b/tests/test-uncommit.t Wed Jun 07 01:38:48 2017 +0100
@@ -286,7 +286,7 @@
$ hg up -C 3 --hidden
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
working directory parent is obsolete! (5eb72dbe0cb4)
- (5eb72dbe0cb4 has diverged, use 'hg evolve -list --divergent' to resolve the issue)
+ (5eb72dbe0cb4 has diverged, use 'hg evolve --list --divergent' to resolve the issue)
$ hg --config extensions.purge= purge
$ hg uncommit --all -X e
1 new divergent changesets