comparison mercurial/commands.py @ 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 96bfd2875213
children cffa46cbdb8f
comparison
equal deleted inserted replaced
28009:4a25e91fa55d 28010:eb22def9db3b
2811 ui.write((' local path: %s (flags "%s")\n') % (lfile, flags)) 2811 ui.write((' local path: %s (flags "%s")\n') % (lfile, flags))
2812 ui.write((' ancestor path: %s (node %s)\n') 2812 ui.write((' ancestor path: %s (node %s)\n')
2813 % (afile, _hashornull(anode))) 2813 % (afile, _hashornull(anode)))
2814 ui.write((' other path: %s (node %s)\n') 2814 ui.write((' other path: %s (node %s)\n')
2815 % (ofile, _hashornull(onode))) 2815 % (ofile, _hashornull(onode)))
2816 elif rtype == 'f':
2817 filename, rawextras = record.split('\0', 1)
2818 extras = rawextras.split('\0')
2819 i = 0
2820 extrastrings = []
2821 while i < len(extras):
2822 extrastrings.append('%s = %s' % (extras[i], extras[i + 1]))
2823 i += 2
2824
2825 ui.write(('file extras: %s (%s)\n')
2826 % (filename, ', '.join(extrastrings)))
2816 else: 2827 else:
2817 ui.write(('unrecognized entry: %s\t%s\n') 2828 ui.write(('unrecognized entry: %s\t%s\n')
2818 % (rtype, record.replace('\0', '\t'))) 2829 % (rtype, record.replace('\0', '\t')))
2819 2830
2820 # Avoid mergestate.read() since it may raise an exception for unsupported 2831 # Avoid mergestate.read() since it may raise an exception for unsupported