Mercurial > public > mercurial-scm > hg
comparison mercurial/extensions.py @ 37957:fb0de0bcd297
cmdutil: drop deprecated precursor of registrar.command (API)
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Thu, 10 May 2018 21:53:48 -0400 |
parents | f0b6fbea00cf |
children | 5b60f7d652f2 |
comparison
equal
deleted
inserted
replaced
37956:f1f8b655da32 | 37957:fb0de0bcd297 |
---|---|
143 | 143 |
144 def _validatecmdtable(ui, cmdtable): | 144 def _validatecmdtable(ui, cmdtable): |
145 """Check if extension commands have required attributes""" | 145 """Check if extension commands have required attributes""" |
146 for c, e in cmdtable.iteritems(): | 146 for c, e in cmdtable.iteritems(): |
147 f = e[0] | 147 f = e[0] |
148 if getattr(f, '_deprecatedregistrar', False): | |
149 ui.deprecwarn("cmdutil.command is deprecated, use " | |
150 "registrar.command to register '%s'" % c, '4.6') | |
151 missing = [a for a in _cmdfuncattrs if not util.safehasattr(f, a)] | 148 missing = [a for a in _cmdfuncattrs if not util.safehasattr(f, a)] |
152 if not missing: | 149 if not missing: |
153 continue | 150 continue |
154 raise error.ProgrammingError( | 151 raise error.ProgrammingError( |
155 'missing attributes: %s' % ', '.join(missing), | 152 'missing attributes: %s' % ', '.join(missing), |