Mercurial > hg > crecord
changeset 55:03f6f5a3ffad
Promote qnew as in 301633755dec
For the moment keep backwards compatibility.
author | Christian Ebert <blacktrash@gmx.net> |
---|---|
date | Sat, 17 Apr 2010 10:41:10 +0200 |
parents | 0a2eebee219c |
children | ea893a572965 |
files | crecord/__init__.py |
diffstat | 1 files changed, 17 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/crecord/__init__.py +++ b/crecord/__init__.py @@ -30,14 +30,23 @@ except KeyError: return - qcmdtable = { - "qcrecord": - (qcrecord, + try: + qcmdtable = { + "qcrecord": + (qcrecord, + + # add qnew options, except '--force' + [opt for opt in mq.cmdtable['^qnew'][1] if opt[1] != 'force'], - # add qnew options, except '--force' - [opt for opt in mq.cmdtable['qnew'][1] if opt[1] != 'force'], - - _('hg qcrecord [OPTION]... PATCH [FILE]...')), - } + _('hg qcrecord [OPTION]... PATCH [FILE]...')), + } + except KeyError: + # backwards compatible with pre 301633755dec + qcmdtable = { + "qcrecord": + (qcrecord, + [opt for opt in mq.cmdtable['qnew'][1] if opt[1] != 'force'], + _('hg qcrecord [OPTION]... PATCH [FILE]...')), + } cmdtable.update(qcmdtable)