# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 1598440043 -19800 # Node ID 6e474eec4be6a1fcf9f4327749b925da2ef66844 # Parent 49ffaa4f65f6f53a79d52dcf4f36125ec8f4395c merge: update commitinfo from all mergeresults during bid merge During bid merge, it's not clear which commitinfo should be stored and which one should not. This depends on which side the bid merge chooses for a file. For this we will need to refactor bid merge code and commitinfo handling. For now, we just blindly updates info since we hardly have any users of commitinfo and this will help us in testing and clearing out further path. Differential Revision: https://phab.mercurial-scm.org/D8965 diff -r 49ffaa4f65f6 -r 6e474eec4be6 mercurial/merge.py --- a/mercurial/merge.py Mon Aug 24 17:22:28 2020 +0530 +++ b/mercurial/merge.py Wed Aug 26 16:37:23 2020 +0530 @@ -1130,6 +1130,7 @@ # mapping of following form: # {ACTION_X : [info, ..], ACTION_Y : [info, ..]} fbids = {} + mresult = mergeresult() diverge, renamedelete = None, None for ancestor in ancestors: repo.ui.note(_(b'\ncalculating bids for ancestor %s\n') % ancestor) @@ -1156,6 +1157,12 @@ ): renamedelete = mresult1.renamedelete + # blindly update final mergeresult commitinfo with what we get + # from mergeresult object for each ancestor + # TODO: some commitinfo depends on what bid merge choose and hence + # we will need to make commitinfo also depend on bid merge logic + mresult._commitinfo.update(mresult1._commitinfo) + for f, a in mresult1.filemap(sort=True): m, args, msg = a repo.ui.debug(b' %s: %s -> %s\n' % (f, msg, m)) @@ -1174,7 +1181,6 @@ _(b'\nauction for merging merge bids (%d ancestors)\n') % len(ancestors) ) - mresult = mergeresult() for f, bids in sorted(fbids.items()): if repo.ui.debugflag: repo.ui.debug(b" list of bids for %s:\n" % f)