# HG changeset patch # User Martin von Zweigbergk # Date 1418163511 28800 # Node ID 5126d7718d7c79270233b85fc99668f37eeb57d2 # Parent a1a7c94def6d2db4e9c68c79491bb6d7feb333c9 merge: move dr/rd warning messages out of applyupdates() As preparation for making 'dr' and 'rd' actions no longer actions, move the reporting from applyupdates() to its caller update(). This way we won't have to pass additonal arguments to applyupdates() when they are no longer actions. Also, the warnings are equally unrelated to applyupdates() as they are to recordupdates(), as they don't result in any changes to either the working copy or the dirstate. See earlier patch for additional motivation. diff -r a1a7c94def6d -r 5126d7718d7c mercurial/merge.py --- a/mercurial/merge.py Fri Dec 05 16:13:26 2014 -0800 +++ b/mercurial/merge.py Tue Dec 09 14:18:31 2014 -0800 @@ -824,22 +824,6 @@ repo.wwrite(f, mctx.filectx(f0).data(), flags) updated += 1 - # divergent renames - for f, args, msg in actions['dr']: - fl, = args - repo.ui.warn(_("note: possible conflict - %s was renamed " - "multiple times to:\n") % f) - for nf in fl: - repo.ui.warn(" %s\n" % nf) - - # rename and delete - for f, args, msg in actions['rd']: - fl, = args - repo.ui.warn(_("note: possible conflict - %s was deleted " - "and renamed to:\n") % f) - for nf in fl: - repo.ui.warn(" %s\n" % nf) - # exec for f, args, msg in actions['e']: repo.ui.debug(" %s: %s -> e\n" % (f, msg)) @@ -1116,6 +1100,22 @@ stats = applyupdates(repo, actions, wc, p2, overwrite, labels=labels) + # divergent renames + for f, args, msg in actions['dr']: + fl, = args + repo.ui.warn(_("note: possible conflict - %s was renamed " + "multiple times to:\n") % f) + for nf in fl: + repo.ui.warn(" %s\n" % nf) + + # rename and delete + for f, args, msg in actions['rd']: + fl, = args + repo.ui.warn(_("note: possible conflict - %s was deleted " + "and renamed to:\n") % f) + for nf in fl: + repo.ui.warn(" %s\n" % nf) + if not partial: repo.dirstate.beginparentchange() repo.setparents(fp1, fp2)