##// END OF EJS Templates
debugformat: update label depending on value difference...
Boris Feld -
r35339:bd326f3e default
parent child Browse files
Show More
@@ -102,6 +102,15 b' except ImportError:'
102 'changeset.secret': '',
102 'changeset.secret': '',
103 'diffstat.deleted': 'red',
103 'diffstat.deleted': 'red',
104 'diffstat.inserted': 'green',
104 'diffstat.inserted': 'green',
105 'formatvariant.name.mismatchconfig': 'red',
106 'formatvariant.name.mismatchdefault': 'yellow',
107 'formatvariant.name.uptodate': 'green',
108 'formatvariant.repo.mismatchconfig': 'red',
109 'formatvariant.repo.mismatchdefault': 'yellow',
110 'formatvariant.repo.uptodate': 'green',
111 'formatvariant.config.special': 'yellow',
112 'formatvariant.config.default': 'green',
113 'formatvariant.default': '',
105 'histedit.remaining': 'red bold',
114 'histedit.remaining': 'red bold',
106 'ui.prompt': 'yellow',
115 'ui.prompt': 'yellow',
107 'log.changeset': 'yellow',
116 'log.changeset': 'yellow',
@@ -891,12 +891,26 b' def debugformat(ui, repo, **opts):'
891 repovalue = fv.fromrepo(repo)
891 repovalue = fv.fromrepo(repo)
892 configvalue = fv.fromconfig(repo)
892 configvalue = fv.fromconfig(repo)
893
893
894 if repovalue != configvalue:
895 namelabel = 'formatvariant.name.mismatchconfig'
896 repolabel = 'formatvariant.repo.mismatchconfig'
897 elif repovalue != fv.default:
898 namelabel = 'formatvariant.name.mismatchdefault'
899 repolabel = 'formatvariant.repo.mismatchdefault'
900 else:
901 namelabel = 'formatvariant.name.uptodate'
902 repolabel = 'formatvariant.repo.uptodate'
903
894 fm.write('name', makeformatname(fv.name), fv.name,
904 fm.write('name', makeformatname(fv.name), fv.name,
895 label='formatvariant.name')
905 label=namelabel)
896 fm.write('repo', ' %3s', formatvalue(repovalue),
906 fm.write('repo', ' %3s', formatvalue(repovalue),
897 label='formatvariant.repo')
907 label=repolabel)
908 if fv.default != configvalue:
909 configlabel = 'formatvariant.config.special'
910 else:
911 configlabel = 'formatvariant.config.default'
898 fm.condwrite(ui.verbose, 'config', ' %6s', formatvalue(configvalue),
912 fm.condwrite(ui.verbose, 'config', ' %6s', formatvalue(configvalue),
899 label='formatvariant.config')
913 label=configlabel)
900 fm.condwrite(ui.verbose, 'default', ' %7s', formatvalue(fv.default),
914 fm.condwrite(ui.verbose, 'default', ' %7s', formatvalue(fv.default),
901 label='formatvariant.default')
915 label='formatvariant.default')
902 fm.plain('\n')
916 fm.plain('\n')
@@ -72,6 +72,12 b' An upgrade of a repository created with '
72 dotencode: yes yes yes
72 dotencode: yes yes yes
73 generaldelta: yes yes yes
73 generaldelta: yes yes yes
74 plain-cl-delta: yes yes yes
74 plain-cl-delta: yes yes yes
75 $ hg debugformat --verbose --config format.usegfncache=no --color=debug
76 format-variant repo config default
77 [formatvariant.name.uptodate|fncache: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
78 [formatvariant.name.uptodate|dotencode: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
79 [formatvariant.name.uptodate|generaldelta: ][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
80 [formatvariant.name.uptodate|plain-cl-delta:][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
75 $ hg debugupgraderepo
81 $ hg debugupgraderepo
76 (no feature deficiencies found in existing repository)
82 (no feature deficiencies found in existing repository)
77 performing an upgrade with "--run" will make the following changes:
83 performing an upgrade with "--run" will make the following changes:
@@ -137,6 +143,12 b' Various sub-optimal detections work'
137 dotencode: no yes yes
143 dotencode: no yes yes
138 generaldelta: no no yes
144 generaldelta: no no yes
139 plain-cl-delta: yes yes yes
145 plain-cl-delta: yes yes yes
146 $ hg debugformat --verbose --config format.usegeneraldelta=no --color=debug
147 format-variant repo config default
148 [formatvariant.name.mismatchconfig|fncache: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes]
149 [formatvariant.name.mismatchconfig|dotencode: ][formatvariant.repo.mismatchconfig| no][formatvariant.config.default| yes][formatvariant.default| yes]
150 [formatvariant.name.mismatchdefault|generaldelta: ][formatvariant.repo.mismatchdefault| no][formatvariant.config.special| no][formatvariant.default| yes]
151 [formatvariant.name.uptodate|plain-cl-delta:][formatvariant.repo.uptodate| yes][formatvariant.config.default| yes][formatvariant.default| yes]
140 $ hg debugupgraderepo
152 $ hg debugupgraderepo
141 repository lacks features recommended by current config options:
153 repository lacks features recommended by current config options:
142
154
General Comments 0
You need to be logged in to leave comments. Login now