Mercurial > evolve
changeset 4209:aa9f33078157 stable
evolve: check if we should use stack template for each item in the stack
We should probably just track the current topic and move all the logic in the
template itself. However, this is a good first step.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 25 Oct 2018 18:08:34 +0200 |
parents | 46cef25fbd96 |
children | 470ba668687a |
files | hgext3rd/evolve/evolvecmd.py |
diffstat | 1 files changed, 5 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/evolvecmd.py Thu Oct 25 10:01:58 2018 +0200 +++ b/hgext3rd/evolve/evolvecmd.py Thu Oct 25 18:08:34 2018 +0200 @@ -1583,15 +1583,13 @@ # check if revs to be evolved are in active topic to make sure that we # can use stack aliases s# in evolve msgs. activetopic = getattr(repo, 'currenttopic', '') - rev = revs[0] - revtopic = getattr(repo[rev], 'topic', '') - if revtopic: - revtopic = revtopic() - stacktmplt = False - if activetopic and revtopic and (activetopic == revtopic): - stacktmplt = True for rev in revs: curctx = repo[rev] + revtopic = getattr(curctx, 'topic', lambda: '')() + topicidx = getattr(curctx, 'topicidx', lambda: None)() + stacktmplt = False + if activetopic and (activetopic == revtopic) and topicidx is not None: + stacktmplt = True progresscb() ret = _solveone(ui, repo, curctx, evolvestate, dryrunopt, confirmopt, progresscb, targetcat,