Mercurial > public > mercurial-scm > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
45384:72e503a24715 | 45385:05d19ca33b33 |
---|---|
1365 ) | 1365 ) |
1366 | 1366 |
1367 for f, op in pycompat.iteritems(mresult.commitinfo): | 1367 for f, op in pycompat.iteritems(mresult.commitinfo): |
1368 # the other side of filenode was choosen while merging, store this in | 1368 # the other side of filenode was choosen while merging, store this in |
1369 # mergestate so that it can be reused on commit | 1369 # mergestate so that it can be reused on commit |
1370 if op[b'filenode-source'] == b'other': | 1370 ms.addcommitinfo(f, op) |
1371 ms.addmergedother(f) | |
1372 | 1371 |
1373 moves = [] | 1372 moves = [] |
1374 | 1373 |
1375 # 'cd' and 'dc' actions are treated like other merge conflicts | 1374 # 'cd' and 'dc' actions are treated like other merge conflicts |
1376 mergeactions = list( | 1375 mergeactions = list( |