[PATCH] merge: also allow 'e' action with experimental.updatecheck=noconflict

Martin von Zweigbergk martinvonz at google.com
Tue Mar 14 05:16:19 UTC 2017


# HG changeset patch
# User Martin von Zweigbergk <martinvonz at google.com>
# Date 1489467523 25200
#      Mon Mar 13 21:58:43 2017 -0700
# Node ID bed0d8465c94c4f19f3bc32b8e427b2d23fa6cda
# Parent  3d3109339b57341b333c1112beb41dd281fa944a
merge: also allow 'e' action with experimental.updatecheck=noconflict

With experimental.updatecheck=noconflict set, if one checks out
f3398f1f70a0 (tests: add execute bit and fix shbang line, 2015-12-22)
and then try to check out its parent, hg will complain about
conflicting changes, even though the working directory is clean. We
need to also allow the 'e' action in merge.py. The 'e' action is used
when moving to a commit where the only change to the file is to its
executable flag, so it's just an optimized 'g' action.

Doesn't seem to be worth writing a test for, since the existing setup
in test-update-branches.t does not set any flags.

diff -r 3d3109339b57 -r bed0d8465c94 mercurial/merge.py
--- a/mercurial/merge.py	Mon Mar 13 11:19:24 2017 -0700
+++ b/mercurial/merge.py	Mon Mar 13 21:58:43 2017 -0700
@@ -1600,7 +1600,7 @@
 
         if updatecheck == 'noconflict':
             for f, (m, args, msg) in actionbyfile.iteritems():
-                if m not in ('g', 'k', 'r'):
+                if m not in ('g', 'k', 'e', 'r'):
                     msg = _("conflicting changes")
                     hint = _("commit or update --clean to discard changes")
                     raise error.Abort(msg, hint=hint)


More information about the Mercurial-devel mailing list