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

login
register
mail settings
Submitter Siddharth Agarwal
Date Oct. 13, 2015, 4:50 a.m.
Message ID <79631637d3cf07d843a0.1444711805@dev6666.prn1.facebook.com>
Download mbox | patch
Permalink /patch/11001/
State Superseded
Commit c502be14b4e2c0ff7e8e8f8ae4e2ca3e2dafad00
Headers show

Comments

Siddharth Agarwal - Oct. 13, 2015, 4:50 a.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1443674847 25200
#      Wed Sep 30 21:47:27 2015 -0700
# Node ID 79631637d3cf07d843a0350a387d904fc176bac7
# Parent  38e87fa7f8cd3cebd8af048d0149f12a8de407aa
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: