comparison mercurial/cmdutil.py @ 32343:d47d7d3bd07b

extensions: show deprecation warning for the use of cmdutil.command Since this is a fundamental API for extensions, we set 1-year period until actually removing it.
author Yuya Nishihara <yuya@tcha.org>
date Sat, 09 Jan 2016 23:24:52 +0900
parents 46ba2cdda476
children 7b3c27af90c2
comparison
equal deleted inserted replaced
32342:e5fbf9687600 32343:d47d7d3bd07b
3333 3333
3334 for f in actions['add'][0] + actions['undelete'][0] + actions['revert'][0]: 3334 for f in actions['add'][0] + actions['undelete'][0] + actions['revert'][0]:
3335 if f in copied: 3335 if f in copied:
3336 repo.dirstate.copy(copied[f], f) 3336 repo.dirstate.copy(copied[f], f)
3337 3337
3338 command = registrar.command 3338 class command(registrar.command):
3339 def _doregister(self, func, name, *args, **kwargs):
3340 func._deprecatedregistrar = True # flag for deprecwarn in extensions.py
3341 return super(command, self)._doregister(func, name, *args, **kwargs)
3339 3342
3340 # a list of (ui, repo, otherpeer, opts, missing) functions called by 3343 # a list of (ui, repo, otherpeer, opts, missing) functions called by
3341 # commands.outgoing. "missing" is "missing" of the result of 3344 # commands.outgoing. "missing" is "missing" of the result of
3342 # "findcommonoutgoing()" 3345 # "findcommonoutgoing()"
3343 outgoinghooks = util.hooks() 3346 outgoinghooks = util.hooks()