--- a/.hgtags Fri Jan 30 22:05:40 2015 +0000
+++ b/.hgtags Thu Mar 05 10:52:01 2015 -0800
@@ -31,3 +31,4 @@
0f30907852831f818bd0d01141b4ab7d8d71b821 5.0.1
dbd0733e584073d6a7b6dea933767853e9cfe845 5.0.2
bfe9be352453640233371cc7deb409a09decacf9 5.1.0
+9b8628e0a142e0e094e27430c388e3c12ceba513 5.1.1
--- a/README Fri Jan 30 22:05:40 2015 +0000
+++ b/README Thu Mar 05 10:52:01 2015 -0800
@@ -51,7 +51,13 @@
Changelog
=========
-5.1 -- 2014-01-30
+5.1.1 -- 2015-03-05
+
+- debugobsconvert: fix invalid markers during conversion
+- discovery: cache some of the obs hash computation to improve performance (issue4518)
+- revset: fix some crash with (issue4515)
+
+5.1 -- 2015-01-30
- evolve: explicitly disable bookmark on evolve (issue4432)
- evolve: don't abort Mercurial on version mismatch
--- a/hgext/evolve.py Fri Jan 30 22:05:40 2015 +0000
+++ b/hgext/evolve.py Thu Mar 05 10:52:01 2015 -0800
@@ -19,7 +19,7 @@
- improves some aspect of the early implementation in Mercurial core
'''
-__version__ = '5.1.0'
+__version__ = '5.1.1'
testedwith = '3.3'
buglink = 'http://bz.selenic.com/'
@@ -502,7 +502,7 @@
"""``precursors(set)``
Immediate precursors of changesets in set.
"""
- s = revset.getset(repo, range(len(repo)), x)
+ s = revset.getset(repo, revset.fullreposet(repo), x)
cs = _precursors(repo, s)
return [r for r in subset if r in cs]
@@ -512,7 +512,7 @@
"""``allprecursors(set)``
Transitive precursors of changesets in set.
"""
- s = revset.getset(repo, range(len(repo)), x)
+ s = revset.getset(repo, revset.fullreposet(repo), x)
cs = _allprecursors(repo, s)
return [r for r in subset if r in cs]
@@ -522,7 +522,7 @@
"""``successors(set)``
Immediate successors of changesets in set.
"""
- s = revset.getset(repo, range(len(repo)), x)
+ s = revset.getset(repo, revset.fullreposet(repo), x)
cs = _successors(repo, s)
return [r for r in subset if r in cs]
@@ -531,7 +531,7 @@
"""``allsuccessors(set)``
Transitive successors of changesets in set.
"""
- s = revset.getset(repo, range(len(repo)), x)
+ s = revset.getset(repo, revset.fullreposet(repo), x)
cs = _allsuccessors(repo, s)
return [r for r in subset if r in cs]
@@ -2729,6 +2729,7 @@
def _obsrelsethashtree(repo):
cache = []
unfi = repo.unfiltered()
+ markercache = {}
for i in unfi:
ctx = unfi[i]
entry = 0
@@ -2745,7 +2746,11 @@
sha.update(p)
tmarkers = repo.obsstore.relevantmarkers([ctx.node()])
if tmarkers:
- bmarkers = [obsolete._fm0encodeonemarker(m) for m in tmarkers]
+ bmarkers = []
+ for m in tmarkers:
+ if not m in markercache:
+ markercache[m] = obsolete._fm0encodeonemarker(m)
+ bmarkers.append(markercache[m])
bmarkers.sort()
for m in bmarkers:
entry += 1
@@ -2769,6 +2774,23 @@
_bestformat = max(obsolete.formats.keys())
+
+if getattr(obsolete, '_checkinvalidmarkers', None) is not None:
+ @eh.wrapfunction(obsolete, '_checkinvalidmarkers')
+ def _checkinvalidmarkers(orig, markers):
+ """search for marker with invalid data and raise error if needed
+
+ Exist as a separated function to allow the evolve extension for a more
+ subtle handling.
+ """
+ if 'debugobsconvert' in sys.argv:
+ return
+ for mark in markers:
+ if node.nullid in mark[1]:
+ raise util.Abort(_('bad obsolescence marker detected: '
+ 'invalid successors nullid'),
+ hint=_('You should run `hg debugobsconvert`'))
+
@command(
'debugobsconvert',
[('', 'new-format', _bestformat, _('Destination format for markers.'))],
@@ -2782,6 +2804,11 @@
known = set()
markers = []
for m in origmarkers:
+ # filter out invalid markers
+ if nullid in m[1]:
+ m = list(m)
+ m[1] = tuple(s for s in m[1] if s != nullid)
+ m = tuple(m)
if m in known:
continue
known.add(m)