merge: improve documentation of fbid dict used for merge bid
authorPulkit Goyal <7895pulkit@gmail.com>
Fri, 24 Jul 2020 15:15:20 +0530
changeset 45280 98218c83242f
parent 45279 f4a2b329717b
child 45281 fe2040abb183
merge: improve documentation of fbid dict used for merge bid I improved the comments explaning what the dict contains meanwhile organizing the comment structure which prevents some confusion. Due to formatting issues, the empty dict was wrapped in `()` which might decieve in thinking that it's a tuple of dict until you decide to find a comma. Differential Revision: https://phab.mercurial-scm.org/D8818
mercurial/merge.py
--- a/mercurial/merge.py	Fri Jul 24 14:45:00 2020 +0530
+++ b/mercurial/merge.py	Fri Jul 24 15:15:20 2020 +0530
@@ -989,10 +989,12 @@
             )
         )
 
-        # Call for bids
-        fbids = (
-            {}
-        )  # mapping filename to bids (action method to list af actions)
+        # mapping filename to bids (action method to list af actions)
+        # {FILENAME1 : BID1, FILENAME2 : BID2}
+        # BID is another dictionary which contains
+        # mapping of following form:
+        # {ACTION_X : [info, ..], ACTION_Y : [info, ..]}
+        fbids = {}
         diverge, renamedelete = None, None
         for ancestor in ancestors:
             repo.ui.note(_(b'\ncalculating bids for ancestor %s\n') % ancestor)
@@ -1033,6 +1035,7 @@
                 else:
                     fbids[f] = {m: [a]}
 
+        # Call for bids
         # Pick the best bid for each file
         repo.ui.note(_(b'\nauction for merging merge bids\n'))
         actions = {}