# HG changeset patch # User Sushil khanchi # Date 1541860210 -3600 # Node ID 2cc81ae30f3770c27b02b802e0d3607d94fe73be # Parent efd542942d98a327b3d610eaac857687d1478021 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. diff -r efd542942d98 -r 2cc81ae30f37 hgext3rd/evolve/__init__.py --- 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)