changeset 28010:eb22def9db3b

merge: add debugmergestate support for _stateextras Now that we can store extras for each file, we need to have support for showing it in debugmergestate (the tests depend on this).
author Durham Goode <durham@fb.com>
date Fri, 05 Feb 2016 10:15:28 -0800
parents 4a25e91fa55d
children 8abd9f785030
files mercurial/commands.py
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Fri Feb 05 10:15:28 2016 -0800
+++ b/mercurial/commands.py	Fri Feb 05 10:15:28 2016 -0800
@@ -2813,6 +2813,17 @@
                          % (afile, _hashornull(anode)))
                 ui.write(('  other path: %s (node %s)\n')
                          % (ofile, _hashornull(onode)))
+            elif rtype == 'f':
+                filename, rawextras = record.split('\0', 1)
+                extras = rawextras.split('\0')
+                i = 0
+                extrastrings = []
+                while i < len(extras):
+                    extrastrings.append('%s = %s' % (extras[i], extras[i + 1]))
+                    i += 2
+
+                ui.write(('file extras: %s (%s)\n')
+                         % (filename, ', '.join(extrastrings)))
             else:
                 ui.write(('unrecognized entry: %s\t%s\n')
                          % (rtype, record.replace('\0', '\t')))