Patchwork [2,of,4,mergedriver] debugmergestate: also recognize change/delete conflicts in the merge state

login
register
mail settings
Submitter Siddharth Agarwal
Date Nov. 30, 2015, 10:25 p.m.
Message ID <57d729187655e7434b96.1448922307@dev666.prn1.facebook.com>
Download mbox | patch
Permalink /patch/11688/
State Accepted
Headers show

Comments

Siddharth Agarwal - Nov. 30, 2015, 10:25 p.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1448418381 28800
#      Tue Nov 24 18:26:21 2015 -0800
# Node ID 57d729187655e7434b9642017b838fd86e664a21
# Parent  1cd9ba22e7f875d825bdfc01e07ed27901cdfe76
# Available At http://42.netv6.net/sid0-wip/hg/
#              hg pull http://42.netv6.net/sid0-wip/hg/ -r 57d729187655
debugmergestate: also recognize change/delete conflicts in the merge state

We're going to use this for tests in upcoming patches.

Patch

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -2562,7 +2562,7 @@  def debugmergestate(ui, repo, *args):
                 driver, mdstate = record.split('\0', 1)
                 ui.write(('merge driver: %s (state "%s")\n')
                          % (driver, mdstate))
-            elif rtype in 'FD':
+            elif rtype in 'FDC':
                 r = record.split('\0')
                 f, state, hash, lfile, afile, anode, ofile = r[0:7]
                 if version == 1:
@@ -2571,7 +2571,7 @@  def debugmergestate(ui, repo, *args):
                 else:
                     onode, flags = r[7:9]
                 ui.write(('file: %s (record type "%s", state "%s", hash %s)\n')
-                         % (f, rtype, state, hash))
+                         % (f, rtype, state, _hashornull(hash)))
                 ui.write(('  local path: %s (flags "%s")\n') % (lfile, flags))
                 ui.write(('  ancestor path: %s (node %s)\n')
                          % (afile, _hashornull(anode)))