Mercurial > hg-stable
diff hgext/record.py @ 21251:a836fa58b512
record: declare commands using decorator
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sun, 04 May 2014 22:35:37 -0700 |
parents | 205599e31870 |
children | fb5f34bb3867 |
line wrap: on
line diff
--- a/hgext/record.py Sun May 04 21:31:51 2014 -0700 +++ b/hgext/record.py Sun May 04 22:35:37 2014 -0700 @@ -459,6 +459,8 @@ # backup all changed files dorecord(ui, repo, committomq, 'qrefresh', True, *pats, **opts) +# This command registration is replaced during uisetup(). +@command('qrecord', [], _('hg qrecord [OPTION]... PATCH [FILE]...')) def qrecord(ui, repo, patch, *pats, **opts): '''interactively record a new patch @@ -637,10 +639,6 @@ finally: ui.write = oldwrite -cmdtable["qrecord"] = \ - (qrecord, [], # placeholder until mq is available - _('hg qrecord [OPTION]... PATCH [FILE]...')) - def uisetup(ui): try: mq = extensions.find('mq')