changeset 45312:26fa2eebc291

mergeresult: rename _actions to _filemapping This is done because we will be introducing another dict which introduces the same information but with action name as key. Differential Revision: https://phab.mercurial-scm.org/D8829
author Pulkit Goyal <7895pulkit@gmail.com>
date Sun, 02 Aug 2020 10:15:55 -0700
parents d70c972cec74
children 69691c5b8ce4
files mercurial/merge.py
diffstat 1 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/merge.py	Fri Jul 24 19:19:47 2020 +0530
+++ b/mercurial/merge.py	Sun Aug 02 10:15:55 2020 -0700
@@ -557,7 +557,7 @@
 
     def __init__(self):
         """
-        actions: dict of filename as keys and action related info as values
+        filemapping: dict of filename as keys and action related info as values
         diverge: mapping of source name -> list of dest name for
                  divergent renames
         renamedelete: mapping of source name -> list of destinations for files
@@ -565,7 +565,7 @@
         commitinfo: dict containing data which should be used on commit
                     contains a filename -> info mapping
         """
-        self._actions = {}
+        self._filemapping = {}
         self._diverge = {}
         self._renamedelete = {}
         self._commitinfo = {}
@@ -583,16 +583,16 @@
         data: a tuple of information like fctx and ctx related to this merge
         message: a message about the merge
         """
-        self._actions[filename] = (action, data, message)
+        self._filemapping[filename] = (action, data, message)
 
     def removefile(self, filename):
         """ removes a file from the mergeresult object as the file might
         not merging anymore """
-        del self._actions[filename]
+        del self._filemapping[filename]
 
     @property
     def actions(self):
-        return self._actions
+        return self._filemapping
 
     @property
     def diverge(self):
@@ -612,7 +612,7 @@
         and a list of files and related arguments as values """
         # Convert to dictionary-of-lists format
         actions = emptyactions()
-        for f, (m, args, msg) in pycompat.iteritems(self._actions):
+        for f, (m, args, msg) in pycompat.iteritems(self._filemapping):
             if m not in actions:
                 actions[m] = []
             actions[m].append((f, args, msg))
@@ -620,15 +620,15 @@
         return actions
 
     def setactions(self, actions):
-        self._actions = actions
+        self._filemapping = actions
 
     def updateactions(self, updates):
-        self._actions.update(updates)
+        self._filemapping.update(updates)
 
     def hasconflicts(self):
         """ tells whether this merge resulted in some actions which can
         result in conflicts or not """
-        for _f, (m, _unused, _unused) in pycompat.iteritems(self._actions):
+        for _f, (m, _unused, _unused) in pycompat.iteritems(self._filemapping):
             if m not in (
                 mergestatemod.ACTION_GET,
                 mergestatemod.ACTION_KEEP,