[Request] [+ ] D8965: merge: update commitinfo from all mergeresults during bid merge
pulkit (Pulkit Goyal)
phabricator at mercurial-scm.org
Thu Aug 27 09:39:08 UTC 2020
pulkit created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
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.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D8965
AFFECTED FILES
mercurial/merge.py
CHANGE DETAILS
diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -1126,6 +1126,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)
@@ -1152,6 +1153,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))
@@ -1167,7 +1174,6 @@
# Call for bids
# Pick the best bid for each file
repo.ui.note(_(b'\nauction for merging merge bids\n'))
- mresult = mergeresult()
for f, bids in sorted(fbids.items()):
# bids is a mapping from action method to list af actions
# Consensus?
To: pulkit, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20200827/3840beb4/attachment.html>
More information about the Mercurial-patches
mailing list