diff mercurial/merge.py @ 45459:ccd3bf4490c1

merge: show list of bids for each file in bid-merge in ui.debug() Earlier, we were showing the list of bids only when we were ambiguously picking. However, the cases where we unambiguously picked a side may not always be correct and need to be fixed. Having list of bids for all files will be helpful in debugging. Differential Revision: https://phab.mercurial-scm.org/D8966
author Pulkit Goyal <7895pulkit@gmail.com>
date Wed, 26 Aug 2020 17:20:53 +0530
parents e7c8a5030a90
children c1d6e930ac8a
line wrap: on
line diff
--- a/mercurial/merge.py	Mon Sep 14 19:39:51 2020 +0900
+++ b/mercurial/merge.py	Wed Aug 26 17:20:53 2020 +0530
@@ -1157,6 +1157,11 @@
         )
         mresult = mergeresult()
         for f, bids in sorted(fbids.items()):
+            if repo.ui.debugflag:
+                repo.ui.debug(b" list of bids for %s:\n" % f)
+                for m, l in sorted(bids.items()):
+                    for _f, args, msg in l:
+                        repo.ui.debug(b'   %s -> %s\n' % (msg, m))
             # bids is a mapping from action method to list af actions
             # Consensus?
             if len(bids) == 1:  # all bids are the same kind of method