diff mercurial/merge.py @ 45385:05d19ca33b33

mergestate: replace `addmergedother()` with generic `addcommitinfo()` (API) Storing that a file is resolved for the other parent while merging is just one case of things we will like to store in the mergestate. There are more which we will like to store. This patch replaces `addmergedother()` with a much more generic `addcommitinfo()`. Doing this, we also blinding stores the same key value pair generated by the merge code instead of touching them. Differential Revision: https://phab.mercurial-scm.org/D8923
author Pulkit Goyal <7895pulkit@gmail.com>
date Mon, 10 Aug 2020 15:47:21 +0530
parents 72e503a24715
children e7c8a5030a90
line wrap: on
line diff
--- a/mercurial/merge.py	Mon Aug 10 15:38:45 2020 +0530
+++ b/mercurial/merge.py	Mon Aug 10 15:47:21 2020 +0530
@@ -1367,8 +1367,7 @@
     for f, op in pycompat.iteritems(mresult.commitinfo):
         # the other side of filenode was choosen while merging, store this in
         # mergestate so that it can be reused on commit
-        if op[b'filenode-source'] == b'other':
-            ms.addmergedother(f)
+        ms.addcommitinfo(f, op)
 
     moves = []