diff hgext/purge.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 5a3f8da663e5
line wrap: on
line diff
--- a/hgext/purge.py	Sat Aug 13 12:29:53 2016 +0900
+++ b/hgext/purge.py	Sun May 14 16:19:47 2017 +0900
@@ -29,7 +29,7 @@
 
 from mercurial.i18n import _
 from mercurial import (
-    commands,
+    cmdutil,
     error,
     registrar,
     scmutil,
@@ -52,7 +52,7 @@
     ('p', 'print', None, _('print filenames instead of deleting them')),
     ('0', 'print0', None, _('end filenames with NUL, for use with xargs'
                             ' (implies -p/--print)')),
-    ] + commands.walkopts,
+    ] + cmdutil.walkopts,
     _('hg purge [OPTION]... [DIR]...'))
 def purge(ui, repo, *dirs, **opts):
     '''removes files not tracked by Mercurial