debugmergestate: add support for printing out merge driver
authorSiddharth Agarwal <sid0@fb.com>
Wed, 30 Sep 2015 21:47:27 -0700
changeset 26652 c502be14b4e2
parent 26651 d58f2f0e2b19
child 26653 cffc4f7c6c36
debugmergestate: add support for printing out merge driver
mercurial/commands.py
--- a/mercurial/commands.py	Wed Sep 30 19:43:51 2015 -0700
+++ b/mercurial/commands.py	Wed Sep 30 21:47:27 2015 -0700
@@ -2510,6 +2510,9 @@
                 ui.write(('local: %s\n') % record)
             elif rtype == 'O':
                 ui.write(('other: %s\n') % record)
+            elif rtype == 'm':
+                driver, mdstate = record.split('\0', 1)
+                ui.write(('merge driver: %s (state "%s")\n') % (driver, mdstate))
             elif rtype == 'F':
                 r = record.split('\0')
                 f, state, hash, lfile, afile, anode, ofile = r[0:7]
@@ -2532,7 +2535,7 @@
     # sort so that reasonable information is on top
     v1records = ms._readrecordsv1()
     v2records = ms._readrecordsv2()
-    order = 'LO'
+    order = 'LOm'
     def key(r):
         idx = order.find(r[0])
         if idx == -1: