Mercurial > hg > evolve
changeset 3234:b93617065659 mercurial-4.1
test-compat: merge mercurial-4.2 into mercurial-4.1
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 23 Oct 2017 15:50:20 +0200 |
parents | a1cdc128defd (current diff) ef04514bca47 (diff) |
children | 9fa39195a4c9 78eb1c1d987b |
files | |
diffstat | 8 files changed, 46 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgtags +++ b/.hgtags @@ -58,3 +58,4 @@ cc3e09e033a3c632c9ac35badbf8b5d53f584049 6.6.0 3a4f75c6619c7ef7d78ee0912efd6cb01d55b521 6.7.0 430ad68292d76b9387d1eeadf289951f51fd88d3 6.7.1 +ec0bbf26ce7fadd42c637e01d3750dac96ac0b1b 6.8.0
--- a/CHANGELOG +++ b/CHANGELOG @@ -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 +++ b/debian/changelog @@ -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 +++ b/hgext3rd/evolve/__init__.py @@ -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 +++ b/hgext3rd/evolve/legacy.py @@ -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 +++ 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.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 +++ b/hgext3rd/topic/__init__.py @@ -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 +++ b/hgext3rd/topic/stack.py @@ -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