# HG changeset patch # User Kevin Bullock # Date 2010-12-21 21:27:58 # Node ID 592998ba34668af1ad2f6e5e2a45e01c1c954d9b # Parent f14cfcc488fb05bb7a648f531656ac1ab5cb77b5 record: clean up command table The --force option to qnew has become a no-op, so qrecord doesn't need to use it. This allows record's command table to be simplified; in the process of doing so, this patch also cleans up the cmdtable visually. diff --git a/hgext/record.py b/hgext/record.py --- a/hgext/record.py +++ b/hgext/record.py @@ -408,8 +408,6 @@ def qrecord(ui, repo, patch, *pats, **op def committomq(ui, repo, *pats, **opts): mq.new(ui, repo, patch, *pats, **opts) - opts = opts.copy() - opts['force'] = True # always 'qnew -f' dorecord(ui, repo, committomq, *pats, **opts) @@ -557,11 +555,7 @@ def dorecord(ui, repo, commitfunc, *pats cmdtable = { "record": - (record, - - # add commit options - commands.table['^commit|ci'][1], - + (record, commands.table['^commit|ci'][1], # same options as commit _('hg record [OPTION]... [FILE]...')), } @@ -574,11 +568,7 @@ def uisetup(ui): qcmdtable = { "qrecord": - (qrecord, - - # add qnew options, except '--force' - [opt for opt in mq.cmdtable['^qnew'][1] if opt[1] != 'force'], - + (qrecord, mq.cmdtable['^qnew'][1], # same options as qnew _('hg qrecord [OPTION]... PATCH [FILE]...')), }