comparison mercurial/debugcommands.py @ 35377:c0b6fa74e007

debugformat: flush formatter output per item
author Yuya Nishihara <yuya@tcha.org>
date Sun, 10 Dec 2017 19:39:39 +0900
parents 740d40ec15c3
children 9144e898cad5
comparison
equal deleted inserted replaced
35376:c7d49b87c1ee 35377:c0b6fa74e007
886 fm.plain(' ' * (maxvariantlength - len('format-variant'))) 886 fm.plain(' ' * (maxvariantlength - len('format-variant')))
887 fm.plain(' repo') 887 fm.plain(' repo')
888 if ui.verbose: 888 if ui.verbose:
889 fm.plain(' config default') 889 fm.plain(' config default')
890 fm.plain('\n') 890 fm.plain('\n')
891 fm.startitem()
892 for fv in upgrade.allformatvariant: 891 for fv in upgrade.allformatvariant:
892 fm.startitem()
893 repovalue = fv.fromrepo(repo) 893 repovalue = fv.fromrepo(repo)
894 configvalue = fv.fromconfig(repo) 894 configvalue = fv.fromconfig(repo)
895 895
896 if repovalue != configvalue: 896 if repovalue != configvalue:
897 namelabel = 'formatvariant.name.mismatchconfig' 897 namelabel = 'formatvariant.name.mismatchconfig'
914 fm.condwrite(ui.verbose, 'config', ' %6s', formatvalue(configvalue), 914 fm.condwrite(ui.verbose, 'config', ' %6s', formatvalue(configvalue),
915 label=configlabel) 915 label=configlabel)
916 fm.condwrite(ui.verbose, 'default', ' %7s', formatvalue(fv.default), 916 fm.condwrite(ui.verbose, 'default', ' %7s', formatvalue(fv.default),
917 label='formatvariant.default') 917 label='formatvariant.default')
918 fm.plain('\n') 918 fm.plain('\n')
919 fm.end()
919 920
920 @command('debugfsinfo', [], _('[PATH]'), norepo=True) 921 @command('debugfsinfo', [], _('[PATH]'), norepo=True)
921 def debugfsinfo(ui, path="."): 922 def debugfsinfo(ui, path="."):
922 """show information detected about current filesystem""" 923 """show information detected about current filesystem"""
923 ui.write(('exec: %s\n') % (util.checkexec(path) and 'yes' or 'no')) 924 ui.write(('exec: %s\n') % (util.checkexec(path) and 'yes' or 'no'))