[Request] [+ ] D8967: merge: show number of ancestors in bid merge debug notes
pulkit (Pulkit Goyal)
phabricator at mercurial-scm.org
Thu Aug 27 09:39:47 UTC 2020
pulkit created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
A good number of times, we don't generate an action for a file in
manifestmerge() which can result in bid merge doing the wrong thing.
Mentioning the number of ancestors from which we are bidding will help spot such
cases where we are not returning an action.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D8967
AFFECTED FILES
mercurial/merge.py
tests/test-merge-criss-cross.t
CHANGE DETAILS
diff --git a/tests/test-merge-criss-cross.t b/tests/test-merge-criss-cross.t
--- a/tests/test-merge-criss-cross.t
+++ b/tests/test-merge-criss-cross.t
@@ -149,7 +149,7 @@
f1: versions differ -> m
f2: remote unchanged -> k
- auction for merging merge bids
+ auction for merging merge bids (2 ancestors)
f1:
list of bids:
remote is newer -> g
@@ -200,7 +200,7 @@
f1: versions differ -> m
f2: remote is newer -> g
- auction for merging merge bids
+ auction for merging merge bids (2 ancestors)
f1:
list of bids:
remote unchanged -> k
@@ -246,7 +246,7 @@
calculating bids for ancestor 40663881a6dd
resolving manifests
- auction for merging merge bids
+ auction for merging merge bids (2 ancestors)
f1:
list of bids:
remote is newer -> g
@@ -281,7 +281,7 @@
f1: versions differ -> m
f2: remote unchanged -> k
- auction for merging merge bids
+ auction for merging merge bids (2 ancestors)
f1:
list of bids:
remote is newer -> g
@@ -375,7 +375,7 @@
calculating bids for ancestor b211bbc6eb3c
resolving manifests
- auction for merging merge bids
+ auction for merging merge bids (2 ancestors)
x:
list of bids:
versions differ -> m
@@ -465,7 +465,7 @@
d1/b: other deleted -> r
d2/b: remote created -> g
- auction for merging merge bids
+ auction for merging merge bids (2 ancestors)
d1/a:
list of bids:
ancestor missing, remote missing -> k
diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -1173,7 +1173,10 @@
# Call for bids
# Pick the best bid for each file
- repo.ui.note(_(b'\nauction for merging merge bids\n'))
+ repo.ui.note(
+ _(b'\nauction for merging merge bids (%d ancestors)\n')
+ % len(ancestors)
+ )
for f, bids in sorted(fbids.items()):
repo.ui.note(_(b" %s:\n list of bids:\n") % f)
for m, l in sorted(bids.items()):
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/940c4d69/attachment.html>
More information about the Mercurial-patches
mailing list