##// END OF EJS Templates
debugformat: add a 'debugformat' command...
Boris Feld -
r35337:c3e4f196 default
parent child Browse files
Show More
@@ -859,6 +859,38 b' def debugfileset(ui, repo, expr, **opts)'
859 for f in ctx.getfileset(expr):
859 for f in ctx.getfileset(expr):
860 ui.write("%s\n" % f)
860 ui.write("%s\n" % f)
861
861
862 @command('debugformat',
863 [] + cmdutil.formatteropts,
864 _(''))
865 def debugformat(ui, repo, **opts):
866 """display format information about the current repository"""
867 maxvariantlength = max(len(fv.name) for fv in upgrade.allformatvariant)
868 maxvariantlength = max(len('format-variant'), maxvariantlength)
869
870 def makeformatname(name):
871 return '%s:' + (' ' * (maxvariantlength - len(name)))
872
873 def formatvalue(value):
874 if value:
875 return 'yes'
876 else:
877 return 'no'
878
879 fm = ui.formatter('debugformat', opts)
880 fm.plain('format-variant')
881 fm.plain(' ' * (maxvariantlength - len('format-variant')))
882 fm.plain(' repo')
883 fm.plain('\n')
884 fm.startitem()
885 for fv in upgrade.allformatvariant:
886 repovalue = fv.fromrepo(repo)
887
888 fm.write('name', makeformatname(fv.name), fv.name,
889 label='formatvariant.name')
890 fm.write('repo', ' %3s', formatvalue(repovalue),
891 label='formatvariant.repo')
892 fm.plain('\n')
893
862 @command('debugfsinfo', [], _('[PATH]'), norepo=True)
894 @command('debugfsinfo', [], _('[PATH]'), norepo=True)
863 def debugfsinfo(ui, path="."):
895 def debugfsinfo(ui, path="."):
864 """show information detected about current filesystem"""
896 """show information detected about current filesystem"""
@@ -87,6 +87,7 b' Show debug commands if there are no othe'
87 debugdiscovery
87 debugdiscovery
88 debugextensions
88 debugextensions
89 debugfileset
89 debugfileset
90 debugformat
90 debugfsinfo
91 debugfsinfo
91 debuggetbundle
92 debuggetbundle
92 debugignore
93 debugignore
@@ -264,6 +265,7 b' Show all commands + options'
264 debugdiscovery: old, nonheads, rev, ssh, remotecmd, insecure
265 debugdiscovery: old, nonheads, rev, ssh, remotecmd, insecure
265 debugextensions: template
266 debugextensions: template
266 debugfileset: rev
267 debugfileset: rev
268 debugformat: template
267 debugfsinfo:
269 debugfsinfo:
268 debuggetbundle: head, common, type
270 debuggetbundle: head, common, type
269 debugignore:
271 debugignore:
@@ -922,6 +922,7 b' Test list of internal help commands'
922 debugextensions
922 debugextensions
923 show information about active extensions
923 show information about active extensions
924 debugfileset parse and apply a fileset specification
924 debugfileset parse and apply a fileset specification
925 debugformat display format information about the current repository
925 debugfsinfo show information detected about current filesystem
926 debugfsinfo show information detected about current filesystem
926 debuggetbundle
927 debuggetbundle
927 retrieves a bundle from a repo
928 retrieves a bundle from a repo
@@ -54,6 +54,12 b' An upgrade of a repository created with '
54
54
55 $ hg init empty
55 $ hg init empty
56 $ cd empty
56 $ cd empty
57 $ hg debugformat
58 format-variant repo
59 fncache: yes
60 dotencode: yes
61 generaldelta: yes
62 plain-cl-delta: yes
57 $ hg debugupgraderepo
63 $ hg debugupgraderepo
58 (no feature deficiencies found in existing repository)
64 (no feature deficiencies found in existing repository)
59 performing an upgrade with "--run" will make the following changes:
65 performing an upgrade with "--run" will make the following changes:
@@ -101,6 +107,12 b' Various sub-optimal detections work'
101 > store
107 > store
102 > EOF
108 > EOF
103
109
110 $ hg debugformat
111 format-variant repo
112 fncache: no
113 dotencode: no
114 generaldelta: no
115 plain-cl-delta: yes
104 $ hg debugupgraderepo
116 $ hg debugupgraderepo
105 repository lacks features recommended by current config options:
117 repository lacks features recommended by current config options:
106
118
General Comments 0
You need to be logged in to leave comments. Login now