diff hgext/record.py @ 32414:04baab18d60a

commands: move templates of common command options to cmdutil (API) The goal is to get rid of the debugcommands -> commands dependency. Since globalopts is the property of the commands, it's kept in the commands module.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 14 May 2017 16:19:47 +0900
parents 46ba2cdda476
children 154e822bf514
line wrap: on
line diff
--- a/hgext/record.py	Sat Aug 13 12:29:53 2016 +0900
+++ b/hgext/record.py	Sun May 14 16:19:47 2017 +0900
@@ -33,7 +33,7 @@
 @command("record",
          # same options as commit + white space diff options
         [c for c in commands.table['^commit|ci'][1][:]
-            if c[1] != "interactive"] + commands.diffwsopts,
+            if c[1] != "interactive"] + cmdutil.diffwsopts,
           _('hg record [OPTION]... [FILE]...'))
 def record(ui, repo, *pats, **opts):
     '''interactively select changes to commit
@@ -136,7 +136,7 @@
         (qrecord,
          # same options as qnew, but copy them so we don't get
          # -i/--interactive for qrecord and add white space diff options
-         mq.cmdtable['^qnew'][1][:] + commands.diffwsopts,
+         mq.cmdtable['^qnew'][1][:] + cmdutil.diffwsopts,
          _('hg qrecord [OPTION]... PATCH [FILE]...'))
 
     _wrapcmd('qnew', mq.cmdtable, qnew, _("interactively record a new patch"))