--- a/.hgtags Fri Oct 20 22:54:08 2017 +0200
+++ b/.hgtags Mon Oct 23 15:50:19 2017 +0200
@@ -58,3 +58,4 @@
cc3e09e033a3c632c9ac35badbf8b5d53f584049 6.6.0
3a4f75c6619c7ef7d78ee0912efd6cb01d55b521 6.7.0
430ad68292d76b9387d1eeadf289951f51fd88d3 6.7.1
+ec0bbf26ce7fadd42c637e01d3750dac96ac0b1b 6.8.0
--- a/CHANGELOG Fri Oct 20 22:54:08 2017 +0200
+++ b/CHANGELOG Mon Oct 23 15:50:19 2017 +0200
@@ -1,8 +1,8 @@
Changelog
=========
-6.8.0 -- in progress
-----------------
+6.8.0 -- 2017-10-23
+-------------------
* compatibility with Mercurial 4.4
(use upstream implementation for obsfate and effect-flags starting hg 4.4+)
--- a/debian/changelog Fri Oct 20 22:54:08 2017 +0200
+++ b/debian/changelog Mon Oct 23 15:50:19 2017 +0200
@@ -1,3 +1,9 @@
+mercurial-evolve (6.8.0-1) UNRELEASED; urgency=medium
+
+ * new upstream release
+
+ -- Pierre-Yves David <pierre-yves.david@ens-lyon.org> Mon, 23 Oct 2017 15:41:03 +0200
+
mercurial-evolve (6.7.1-1) unstable; urgency=medium
* new upstream release
--- a/hgext3rd/evolve/__init__.py Fri Oct 20 22:54:08 2017 +0200
+++ b/hgext3rd/evolve/__init__.py Mon Oct 23 15:50:19 2017 +0200
@@ -1122,10 +1122,10 @@
if othertroubles:
hint = hintmap['+'.join(othertroubles)]
else:
- l = len(troubled[targetcat])
- if l:
+ length = len(troubled[targetcat])
+ if length:
hint = _("%d other %s in the repository, do you want --any "
- "or --rev") % (l, targetcat)
+ "or --rev") % (length, targetcat)
else:
othertroubles = []
for cat in unselectedcategories:
--- a/hgext3rd/evolve/legacy.py Fri Oct 20 22:54:08 2017 +0200
+++ b/hgext3rd/evolve/legacy.py Mon Oct 23 15:50:19 2017 +0200
@@ -86,7 +86,7 @@
"""import markers from an .hg/obsolete-relations file"""
cnt = 0
err = 0
- l = repo.lock()
+ lock = repo.lock()
some = False
try:
unlink = []
@@ -163,7 +163,7 @@
tr.release()
finally:
del repo._importoldobsolete
- l.release()
+ lock.release()
if not some:
ui.warn(_('nothing to do\n'))
ui.status('%i obsolete marker converted\n' % cnt)
--- a/hgext3rd/evolve/metadata.py Fri Oct 20 22:54:08 2017 +0200
+++ b/hgext3rd/evolve/metadata.py Mon Oct 23 15:50:19 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.8.0.dev'
-testedwith = '3.8.4 3.9.2 4.0.2 4.1.3 4.2.3 4.3.2'
+__version__ = '6.8.0'
+testedwith = '3.8.4 3.9.2 4.0.2 4.1.3 4.2.3 4.3.2 4.4'
minimumhgversion = '3.8'
buglink = 'https://bz.mercurial-scm.org/'
--- a/hgext3rd/topic/__init__.py Fri Oct 20 22:54:08 2017 +0200
+++ b/hgext3rd/topic/__init__.py Mon Oct 23 15:50:19 2017 +0200
@@ -139,9 +139,9 @@
'topic.active': 'green',
}
-__version__ = '0.4.0.dev'
+__version__ = '0.4.0'
-testedwith = '4.0.2 4.1.3 4.2.3 4.3.3'
+testedwith = '4.0.2 4.1.3 4.2.3 4.3.3 4.4'
minimumhgversion = '4.0'
buglink = 'https://bz.mercurial-scm.org/'
@@ -517,16 +517,16 @@
raise error.Abort('changing topic requires a topic name or --clear')
if repo.revs('%ld and public()', touchedrevs):
raise error.Abort("can't change topic of a public change")
- wl = l = txn = None
+ wl = lock = txn = None
try:
wl = repo.wlock()
- l = repo.lock()
+ lock = repo.lock()
txn = repo.transaction('rewrite-topics')
rewrote = _changetopics(ui, repo, touchedrevs, topic)
txn.close()
ui.status('changed topic on %d changes\n' % rewrote)
finally:
- lockmod.release(txn, l, wl)
+ lockmod.release(txn, lock, wl)
repo.invalidate()
return
--- a/hgext3rd/topic/stack.py Fri Oct 20 22:54:08 2017 +0200
+++ b/hgext3rd/topic/stack.py Mon Oct 23 15:50:19 2017 +0200
@@ -9,6 +9,7 @@
error,
node,
phases,
+ obsolete,
util,
)
from .evolvebits import builddependencies, _singlesuccessor
@@ -23,6 +24,25 @@
if not util.safehasattr(context.basectx, 'isunstable'):
context.basectx.isunstable = context.basectx.troubled
+def _stackcandidates(repo):
+ """build the smaller set of revs that might be part of a stack.
+
+ The intend is to build something more efficient than what revsets do in
+ this area.
+ """
+ phasecache = repo._phasecache
+ if not phasecache._phasesets:
+ return repo.revs('(not public()) - obsolete()')
+ if any(s is None for s in phasecache._phasesets):
+ return repo.revs('(not public()) - obsolete()')
+
+ result = set()
+ for s in phasecache._phasesets[phases.draft:]:
+ result |= s
+
+ result -= obsolete.getrevs(repo, 'obsolete')
+ return result
+
class stack(object):
"""object represent a stack and common logic associated to it."""
@@ -31,12 +51,15 @@
self.branch = branch
self.topic = topic
self.behinderror = None
+
+ subset = _stackcandidates(repo)
+
if topic is not None and branch is not None:
raise error.ProgrammingError('both branch and topic specified (not defined yet)')
elif topic is not None:
- trevs = repo.revs("not obsolete() and topic(%s)", topic)
+ trevs = repo.revs("%ld and topic(%s)", subset, topic)
elif branch is not None:
- trevs = repo.revs("not public() and branch(%s) - obsolete() - topic()", branch)
+ trevs = repo.revs("%ld and branch(%s) - topic()", subset, branch)
else:
raise error.ProgrammingError('neither branch and topic specified (not defined yet)')
self._revs = trevs