# HG changeset patch # User Siddharth Agarwal # Date 2015-11-14 07:01:36 # Node ID c48fee950ce4f0d846ac093a7fb5fb8bd072011f # Parent 6618dfd3ea1c15aed75b7ef005a2c36059ff443f 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)