# HG changeset patch # User Sushil khanchi # Date 1541483559 -19800 # Node ID efd542942d98a327b3d610eaac857687d1478021 # Parent 424b498aac009f9977eb7ecba9e7ef6958f8339f next: move some code to prepare for `next --evolve` by default Moved some values before the block where we suggest the user to use --merge flag. As we would need these values to find if we need to evolve or not before we can suggest user to use `--merge` flag. We will suggest user to use `--merge` flag only when we don't need to evolve. Because currently we don't support both --evolve(going to be True by default) and --merge at the same time. diff -r 424b498aac00 -r efd542942d98 hgext3rd/evolve/__init__.py --- a/hgext3rd/evolve/__init__.py Sat Nov 10 00:55:34 2018 +0100 +++ b/hgext3rd/evolve/__init__.py Tue Nov 06 11:22:39 2018 +0530 @@ -1136,6 +1136,16 @@ if opts['evolve']: cmdutil.bailifchanged(repo) + children = [ctx for ctx in wparents[0].children() if not ctx.obsolete()] + topic = _getcurrenttopic(repo) + filtered = set() + template = shorttemplate + if topic and not opts.get("no_topic", False): + filtered = set(ctx for ctx in children if ctx.topic() != topic) + children = [ctx for ctx in children if ctx not in filtered] + template = utility.stacktemplate + displayer = compat.changesetdisplayer(ui, repo, {'template': template}) + if not opts['merge']: # we only skip the check if noconflict is set if ui.config('commands', 'update.check') == 'noconflict': @@ -1147,15 +1157,6 @@ exc.hint = _('do you want --merge?') raise - children = [ctx for ctx in wparents[0].children() if not ctx.obsolete()] - topic = _getcurrenttopic(repo) - filtered = set() - template = shorttemplate - if topic and not opts.get("no_topic", False): - filtered = set(ctx for ctx in children if ctx.topic() != topic) - children = [ctx for ctx in children if ctx not in filtered] - template = utility.stacktemplate - displayer = compat.changesetdisplayer(ui, repo, {'template': template}) if len(children) == 1: c = children[0] return _updatetonext(ui, repo, c, displayer, opts)