Mercurial > public > mercurial-scm > hg-stable
diff mercurial/simplemerge.py @ 48594:50de08904c63
merge: consider the file merged when using :merge-{local,other}
Returning `None` from `simplemerge()` means that the caller interprets
it as "no merge was necessary (because two sides matched)". See
6217040b2780 and issue2680 for some background. However,
`simplemerge()` shouldn't even get called in such scenarios, and
returning `None` means that the file is not considered merged, even
though the contents actually were. See the affected test cases.
Differential Revision: https://phab.mercurial-scm.org/D11999
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 14 Jan 2022 09:28:44 -0800 |
parents | 7ed4c4753891 |
children | 77e24ee8994b |
line wrap: on
line diff
--- a/mercurial/simplemerge.py Fri Jan 14 08:44:36 2022 -0800 +++ b/mercurial/simplemerge.py Fri Jan 14 09:28:44 2022 -0800 @@ -483,7 +483,7 @@ basetext = readctx(basectx) othertext = readctx(otherctx) except error.Abort: - return 1 + return True m3 = Merge3Text(basetext, localtext, othertext) conflicts = False @@ -511,5 +511,4 @@ # mergestate.resolve()) localctx.write(mergedtext, localctx.flags()) - if conflicts: - return 1 + return conflicts