mergestate: add a way to record pending dirstate actions
authorSiddharth Agarwal <sid0@fb.com>
Fri, 20 Nov 2015 16:55:01 -0800
changeset 27088 e2b79f57903a
parent 27087 98fc58378a3f
child 27089 dbb30bc16fc2
mergestate: add a way to record pending dirstate actions We're going to use this in resolve in the next patch.
mercurial/merge.py
--- a/mercurial/merge.py	Sun Nov 15 21:55:46 2015 -0800
+++ b/mercurial/merge.py	Fri Nov 20 16:55:01 2015 -0800
@@ -517,6 +517,11 @@
                 actions[action].append((f, None, "merge result"))
         return actions
 
+    def recordactions(self):
+        """record remove/add/get actions in the dirstate"""
+        branchmerge = self._repo.dirstate.p2() != nullid
+        recordupdates(self._repo, self.actions(), branchmerge)
+
 def _checkunknownfile(repo, wctx, mctx, f, f2=None):
     if f2 is None:
         f2 = f