[Updated] D8821: merge: add removefile() to mergeresult object

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


Closed by commit rHGf1fb9a079131: merge: add removefile() to mergeresult object (authored by pulkit).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D8821?vs=22105&id=22204

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

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

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
@@ -576,6 +576,11 @@
         """
         self._actions[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]
+
     @property
     def actions(self):
         return self._actions
@@ -1929,7 +1934,7 @@
                         b'prompt recreating',
                     )
                 else:
-                    del mresult.actions[f]
+                    mresult.removefile(f)
 
         # Convert to dictionary-of-lists format
         actions = mresult.actionsdict



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/13c380d4/attachment-0002.html>


More information about the Mercurial-patches mailing list