[PATCH 2 of 7 mergedriver] debugmergestate: print out record type for files
Siddharth Agarwal
sid0 at fb.com
Mon Nov 16 23:46:06 UTC 2015
# HG changeset patch
# User Siddharth Agarwal <sid0 at fb.com>
# Date 1447484496 28800
# Fri Nov 13 23:01:36 2015 -0800
# Node ID 961c7229e7efb64e13cf50adb85ce09a3992252f
# Parent 076d659bc45077d8a25e5c09f7d9666c0e9d46b2
debugmergestate: print out record type for files
We're going to add a separate record type for change/delete conflicts soon. We
need to make sure they get stored with the correct record type so that older
versions of Mercurial correctly abort when they see change/delete records.
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -2547,8 +2547,8 @@ def debugmergestate(ui, repo, *args):
flags = r[7]
else:
onode, flags = r[7:9]
- ui.write(('file: %s (state "%s", hash %s)\n')
- % (f, state, hash))
+ ui.write(('file: %s (record type "%s", state "%s", hash %s)\n')
+ % (f, rtype, state, hash))
ui.write((' local path: %s (flags "%s")\n') % (lfile, flags))
ui.write((' ancestor path: %s (node %s)\n') % (afile, anode))
ui.write((' other path: %s (node %s)\n') % (ofile, onode))
diff --git a/tests/test-backout.t b/tests/test-backout.t
--- a/tests/test-backout.t
+++ b/tests/test-backout.t
@@ -686,7 +686,7 @@ Test usage of `hg resolve` in case of co
* version 2 records
local: b71750c4b0fdf719734971e3ef90dbeab5919a2d
other: a30dd8addae3ce71b8667868478542bc417439e6
- file: foo (state "u", hash 0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33)
+ file: foo (record type "F", state "u", hash 0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33)
local path: foo (flags "")
ancestor path: foo (node f89532f44c247a0e993d63e3a734dd781ab04708)
other path: foo (node f50039b486d6fa1a90ae51778388cad161f425ee)
@@ -694,7 +694,7 @@ Test usage of `hg resolve` in case of co
$ hg debugmergestate
* version 1 records
local: b71750c4b0fdf719734971e3ef90dbeab5919a2d
- file: foo (state "u", hash 0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33)
+ file: foo (record type "F", state "u", hash 0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33)
local path: foo (flags "")
ancestor path: foo (node f89532f44c247a0e993d63e3a734dd781ab04708)
other path: foo (node not stored in v1 format)
More information about the Mercurial-devel
mailing list