Patchwork [4,of,5,mergedriver,V2] debugmergestate: add support for printing out merge driver

login
register
mail settings
Submitter Siddharth Agarwal
Date Oct. 13, 2015, 10:10 p.m.
Message ID <83f9eea19ddb82b29d0a.1444774217@dev6666.prn1.facebook.com>
Download mbox | patch
Permalink /patch/11039/
State Accepted
Headers show

Comments

Siddharth Agarwal - Oct. 13, 2015, 10:10 p.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1443674847 25200
#      Wed Sep 30 21:47:27 2015 -0700
# Node ID 83f9eea19ddb82b29d0a4f4fbd0673a74ada9f23
# Parent  ef0fa195b1e2a7763dff02dabe670b7cca3c69c5
debugmergestate: add support for printing out merge driver

Patch

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -2504,6 +2504,9 @@  def debugmergestate(ui, repo, *args):
                 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]
@@ -2526,7 +2529,7 @@  def debugmergestate(ui, repo, *args):
     # 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: