# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 1598442862 -19800 # Node ID e7c8a5030a90d99640beb51623ab5dec996c1e20 # Parent 00e4e97c6bc83aaa3f86989ffbe625da239b7d8a merge: show number of ancestors in bid merge debug notes 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. Differential Revision: https://phab.mercurial-scm.org/D8967 diff -r 00e4e97c6bc8 -r e7c8a5030a90 mercurial/merge.py --- a/mercurial/merge.py Thu Sep 03 14:45:16 2020 +0530 +++ b/mercurial/merge.py Wed Aug 26 17:24:22 2020 +0530 @@ -1151,7 +1151,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) + ) mresult = mergeresult() for f, bids in sorted(fbids.items()): # bids is a mapping from action method to list af actions diff -r 00e4e97c6bc8 -r e7c8a5030a90 tests/test-merge-criss-cross.t --- a/tests/test-merge-criss-cross.t Thu Sep 03 14:45:16 2020 +0530 +++ b/tests/test-merge-criss-cross.t Wed Aug 26 17:24:22 2020 +0530 @@ -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: picking 'get' action f2: picking 'keep' action end of auction @@ -192,7 +192,7 @@ f1: versions differ -> m f2: remote is newer -> g - auction for merging merge bids + auction for merging merge bids (2 ancestors) f1: picking 'keep' action f2: picking 'get' action end of auction @@ -230,7 +230,7 @@ calculating bids for ancestor 40663881a6dd resolving manifests - auction for merging merge bids + auction for merging merge bids (2 ancestors) f1: picking 'get' action f2: picking 'keep' action end of auction @@ -257,7 +257,7 @@ f1: versions differ -> m f2: remote unchanged -> k - auction for merging merge bids + auction for merging merge bids (2 ancestors) f1: picking 'get' action f2: picking 'keep' action end of auction @@ -343,7 +343,7 @@ calculating bids for ancestor b211bbc6eb3c resolving manifests - auction for merging merge bids + auction for merging merge bids (2 ancestors) x: multiple bids for merge action: versions differ -> m versions differ -> m @@ -430,7 +430,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: consensus for r d1/b: consensus for r d2/b: consensus for g