changeset 45288:3f5ac87ae10f

merge: introduce mergeresult.updateactions() and use it We don't want direct editing and access of mergeresult._actions because soon we will like to maintain data in other structures also. Differential Revision: https://phab.mercurial-scm.org/D8826
author Pulkit Goyal <7895pulkit@gmail.com>
date Fri, 24 Jul 2020 18:16:29 +0530
parents 4ad6c4e9e35f
children 1d1f112da75c
files mercurial/merge.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/merge.py	Fri Jul 24 17:57:23 2020 +0530
+++ b/mercurial/merge.py	Fri Jul 24 18:16:29 2020 +0530
@@ -622,6 +622,9 @@
     def setactions(self, actions):
         self._actions = actions
 
+    def updateactions(self, updates):
+        self._actions.update(updates)
+
     def hasconflicts(self):
         """ tells whether this merge resulted in some actions which can
         result in conflicts or not """
@@ -1125,7 +1128,7 @@
 
     if wctx.rev() is None:
         fractions = _forgetremoved(wctx, mctx, branchmerge)
-        mresult.actions.update(fractions)
+        mresult.updateactions(fractions)
 
     prunedactions = sparse.filterupdatesactions(
         repo, wctx, mctx, branchmerge, mresult.actions