Mercurial > public > mercurial-scm > hg-stable
diff hgext/keyword.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 | 50586a0a946f |
line wrap: on
line diff
--- a/hgext/keyword.py Sat Aug 13 12:29:53 2016 +0900 +++ b/hgext/keyword.py Sun May 14 16:19:47 2017 +0900 @@ -94,7 +94,6 @@ from mercurial import ( cmdutil, - commands, context, dispatch, error, @@ -481,7 +480,7 @@ repo.wvfs.rmtree(repo.root) @command('kwexpand', - commands.walkopts, + cmdutil.walkopts, _('hg kwexpand [OPTION]... [FILE]...'), inferrepo=True) def expand(ui, repo, *pats, **opts): @@ -498,7 +497,7 @@ [('A', 'all', None, _('show keyword status flags of all files')), ('i', 'ignore', None, _('show files excluded from expansion')), ('u', 'unknown', None, _('only show unknown (not tracked) files')), - ] + commands.walkopts, + ] + cmdutil.walkopts, _('hg kwfiles [OPTION]... [FILE]...'), inferrepo=True) def files(ui, repo, *pats, **opts): @@ -557,7 +556,7 @@ fm.end() @command('kwshrink', - commands.walkopts, + cmdutil.walkopts, _('hg kwshrink [OPTION]... [FILE]...'), inferrepo=True) def shrink(ui, repo, *pats, **opts):