diff -r 34f2c634c8f6 -r 3ca5ca380a34 mercurial/filemerge.py --- a/mercurial/filemerge.py Mon Dec 14 14:31:15 2020 +0100 +++ b/mercurial/filemerge.py Mon Dec 14 18:09:37 2020 -0800 @@ -408,7 +408,7 @@ ui = repo.ui - validkeep = [b'keep', b'keep-merge3'] + validkeep = [b'keep', b'keep-merge3', b'keep-mergediff'] # do we attempt to simplemerge first? try: @@ -423,12 +423,17 @@ ) if premerge: - if premerge == b'keep-merge3': + mode = b'merge' + if premerge in {b'keep-merge3', b'keep-mergediff'}: if not labels: labels = _defaultconflictlabels if len(labels) < 3: labels.append(b'base') - r = simplemerge.simplemerge(ui, fcd, fca, fco, quiet=True, label=labels) + if premerge == b'keep-mergediff': + mode = b'mergediff' + r = simplemerge.simplemerge( + ui, fcd, fca, fco, quiet=True, label=labels, mode=mode + ) if not r: ui.debug(b" premerge successful\n") return 0