Mercurial > evolve
changeset 4234:2cc81ae30f37
next: set if we need to evolve or not; also move logic to appropriate pos
set the value `needevolve` and also move the logic to find aspiringchildren
to appropriate position i.e before we suggest user to use other flags like
--merge.
author | Sushil khanchi <sushilkhanchi97@gmail.com> |
---|---|
date | Sat, 10 Nov 2018 15:30:10 +0100 |
parents | efd542942d98 |
children | 259d57b906a4 |
files | hgext3rd/evolve/__init__.py |
diffstat | 1 files changed, 7 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/__init__.py Tue Nov 06 11:22:39 2018 +0530 +++ b/hgext3rd/evolve/__init__.py Sat Nov 10 15:30:10 2018 +0100 @@ -1146,6 +1146,13 @@ template = utility.stacktemplate displayer = compat.changesetdisplayer(ui, repo, {'template': template}) + # check if we need to evolve while updating to the next child revision + aspchildren = evolvecmd._aspiringchildren(repo, [repo['.'].rev()]) + if topic: + filtered.update(repo[c] for c in aspchildren + if repo[c].topic() != topic) + aspchildren = [ctx for ctx in aspchildren if ctx not in filtered] + if not opts['merge']: # we only skip the check if noconflict is set if ui.config('commands', 'update.check') == 'noconflict': @@ -1173,11 +1180,6 @@ else: return _updatetonext(ui, repo, repo[choosedrev], displayer, opts) else: - aspchildren = evolvecmd._aspiringchildren(repo, [repo['.'].rev()]) - if topic: - filtered.update(repo[c] for c in aspchildren - if repo[c].topic() != topic) - aspchildren = [ctx for ctx in aspchildren if ctx not in filtered] if not opts['evolve'] or not aspchildren: if filtered: ui.warn(_('no children on topic "%s"\n') % topic)