Show More
@@ -873,15 +873,18 b' def debugformat(ui, repo, **opts):' | |||||
873 | def makeformatname(name): |
|
873 | def makeformatname(name): | |
874 | return '%s:' + (' ' * (maxvariantlength - len(name))) |
|
874 | return '%s:' + (' ' * (maxvariantlength - len(name))) | |
875 |
|
875 | |||
876 | def formatvalue(value): |
|
876 | fm = ui.formatter('debugformat', opts) | |
877 | if util.safehasattr(value, 'startswith'): |
|
877 | if fm.isplain(): | |
878 | return value |
|
878 | def formatvalue(value): | |
879 | if value: |
|
879 | if util.safehasattr(value, 'startswith'): | |
880 |
return |
|
880 | return value | |
881 |
|
|
881 | if value: | |
882 |
return ' |
|
882 | return 'yes' | |
|
883 | else: | |||
|
884 | return 'no' | |||
|
885 | else: | |||
|
886 | formatvalue = pycompat.identity | |||
883 |
|
887 | |||
884 | fm = ui.formatter('debugformat', opts) |
|
|||
885 | fm.plain('format-variant') |
|
888 | fm.plain('format-variant') | |
886 | fm.plain(' ' * (maxvariantlength - len('format-variant'))) |
|
889 | fm.plain(' ' * (maxvariantlength - len('format-variant'))) | |
887 | fm.plain(' repo') |
|
890 | fm.plain(' repo') |
@@ -85,28 +85,28 b' An upgrade of a repository created with ' | |||||
85 | $ hg debugformat -Tjson |
|
85 | $ hg debugformat -Tjson | |
86 | [ |
|
86 | [ | |
87 | { |
|
87 | { | |
88 |
"config": |
|
88 | "config": true, | |
89 |
"default": |
|
89 | "default": true, | |
90 | "name": "fncache", |
|
90 | "name": "fncache", | |
91 |
"repo": |
|
91 | "repo": true | |
92 | }, |
|
92 | }, | |
93 | { |
|
93 | { | |
94 |
"config": |
|
94 | "config": true, | |
95 |
"default": |
|
95 | "default": true, | |
96 | "name": "dotencode", |
|
96 | "name": "dotencode", | |
97 |
"repo": |
|
97 | "repo": true | |
98 | }, |
|
98 | }, | |
99 | { |
|
99 | { | |
100 |
"config": |
|
100 | "config": true, | |
101 |
"default": |
|
101 | "default": true, | |
102 | "name": "generaldelta", |
|
102 | "name": "generaldelta", | |
103 |
"repo": |
|
103 | "repo": true | |
104 | }, |
|
104 | }, | |
105 | { |
|
105 | { | |
106 |
"config": |
|
106 | "config": true, | |
107 |
"default": |
|
107 | "default": true, | |
108 | "name": "plain-cl-delta", |
|
108 | "name": "plain-cl-delta", | |
109 |
"repo": |
|
109 | "repo": true | |
110 | }, |
|
110 | }, | |
111 | { |
|
111 | { | |
112 | "config": "zlib", |
|
112 | "config": "zlib", |
General Comments 0
You need to be logged in to leave comments.
Login now