changeset 13196:592998ba3466

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.
author Kevin Bullock <kbullock@ringworld.org>
date Tue, 21 Dec 2010 15:27:58 -0600
parents f14cfcc488fb
children 684a977c2ae0
files hgext/record.py
diffstat 1 files changed, 2 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/record.py	Tue Dec 21 15:23:48 2010 -0600
+++ b/hgext/record.py	Tue Dec 21 15:27:58 2010 -0600
@@ -408,8 +408,6 @@
     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 @@
 
 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 @@
 
     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]...')),
     }