Patchwork [3,of,7,mergedriver] merge.mergestate: add a way to get the merge driver state

login
register
mail settings
Submitter Siddharth Agarwal
Date Oct. 17, 2015, 2:35 a.m.
Message ID <d5ffcf6fd5b81033c08c.1445049316@dev6666.prn1.facebook.com>
Download mbox | patch
Permalink /patch/11159/
State Accepted
Headers show

Comments

Siddharth Agarwal - Oct. 17, 2015, 2:35 a.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1444895876 25200
#      Thu Oct 15 00:57:56 2015 -0700
# Node ID d5ffcf6fd5b81033c08ca68ea97b2b2a1382befc
# Parent  a1d0e62becae8276351a7dd9a76912cb3ea9f905
merge.mergestate: add a way to get the merge driver state

This will be useful to check what the status of the merge driver is.

Patch

diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -329,6 +329,9 @@  class mergestate(object):
         self._state[dfile][0] = state
         self._dirty = True
 
+    def mdstate(self):
+        return self._mdstate
+
     def unresolved(self):
         """Obtain the paths of unresolved files."""