mergestate._resolve: store return code and action for each file
authorSiddharth Agarwal <sid0@fb.com>
Fri, 20 Nov 2015 16:08:22 -0800
changeset 27074 78b0c88ab0db
parent 27073 b9fc042168a4
child 27075 6373330155b2
mergestate._resolve: store return code and action for each file We're going to need this to compute (a) updated/merged/unresolved counts, and (b) actions to perform on the dirstate.
mercurial/merge.py
--- a/mercurial/merge.py	Sat Nov 21 15:43:04 2015 -0800
+++ b/mercurial/merge.py	Fri Nov 20 16:08:22 2015 -0800
@@ -114,6 +114,7 @@
         else:
             self._mdstate = 'u'
         shutil.rmtree(self._repo.join('merge'), True)
+        self._results = {}
         self._dirty = False
 
     def _read(self):
@@ -150,6 +151,7 @@
                 self._state[bits[0]] = bits[1:]
             elif not rtype.islower():
                 unsupported.add(rtype)
+        self._results = {}
         self._dirty = False
 
         if unsupported:
@@ -466,6 +468,7 @@
                 elif fco.isabsent(): # cd: local picked
                     action = 'a'
                 # else: regular merges (no action necessary)
+            self._results[dfile] = r, action
 
         return complete, r, action