Show More
@@ -165,7 +165,7 b' def _rejectunicode(name, xs):' | |||||
165 |
|
165 | |||
166 |
|
166 | |||
167 | # attributes set by registrar.command |
|
167 | # attributes set by registrar.command | |
168 |
_cmdfuncattrs = ( |
|
168 | _cmdfuncattrs = ('norepo', 'optionalrepo', 'inferrepo') | |
169 |
|
169 | |||
170 |
|
170 | |||
171 | def _validatecmdtable(ui, cmdtable): |
|
171 | def _validatecmdtable(ui, cmdtable): | |
@@ -175,10 +175,10 b' def _validatecmdtable(ui, cmdtable):' | |||||
175 | missing = [a for a in _cmdfuncattrs if not util.safehasattr(f, a)] |
|
175 | missing = [a for a in _cmdfuncattrs if not util.safehasattr(f, a)] | |
176 | if not missing: |
|
176 | if not missing: | |
177 | continue |
|
177 | continue | |
178 | raise error.ProgrammingError( |
|
178 | msg = b'missing attributes: %s' | |
179 | b'missing attributes: %s' % b', '.join(missing), |
|
179 | msg %= b', '.join([stringutil.forcebytestr(m) for m in missing]) | |
180 |
|
|
180 | hint = b"use @command decorator to register '%s'" % c | |
181 | ) |
|
181 | raise error.ProgrammingError(msg, hint=hint) | |
182 |
|
182 | |||
183 |
|
183 | |||
184 | def _validatetables(ui, mod): |
|
184 | def _validatetables(ui, mod): |
General Comments 0
You need to be logged in to leave comments.
Login now