merge.mergestate: add a generator for driver-resolved files
authorSiddharth Agarwal <sid0@fb.com>
Wed, 14 Oct 2015 15:01:07 -0700
changeset 26740 f4a27c05c43f
parent 26739 8429369eeb85
child 26741 e1568d5eb052
merge.mergestate: add a generator for driver-resolved files Just like for unresolved files above, we need to be able to tell what files are driver-resolved.
mercurial/merge.py
--- a/mercurial/merge.py	Wed Oct 14 16:27:10 2015 -0700
+++ b/mercurial/merge.py	Wed Oct 14 15:01:07 2015 -0700
@@ -329,6 +329,13 @@
             if entry[0] == 'u':
                 yield f
 
+    def driverresolved(self):
+        """Obtain the paths of driver-resolved files."""
+
+        for f, entry in self._state.items():
+            if entry[0] == 'd':
+                yield f
+
     def _resolve(self, preresolve, dfile, wctx, labels=None):
         """rerun merge process for file path `dfile`"""
         if self[dfile] in 'rd':