[Updated] D8829: mergeresult: rename _actions to _filemapping

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Sun Aug 2 17:46:21 UTC 2020


Closed by commit rHG26fa2eebc291: mergeresult: rename _actions to _filemapping (authored by pulkit).
This revision was automatically updated to reflect the committed changes.

CHANGED PRIOR TO COMMIT
  https://phab.mercurial-scm.org/D8829?vs=22113&id=22212#toc

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D8829?vs=22113&id=22212

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8829/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D8829

AFFECTED FILES
  mercurial/merge.py

CHANGE DETAILS

diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -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,



To: pulkit, #hg-reviewers, indygreg
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20200802/89bc3a99/attachment-0002.html>


More information about the Mercurial-patches mailing list