# HG changeset patch # User Gregory Szorc # Date 2014-05-05 05:16:56 # Node ID c4633e287c56c3d588ab6f36786b92d35b1975cc # Parent 5403245edb3a19f148900417643e495393e21833 keyword: define optionalrepo in command decorator diff --git a/hgext/keyword.py b/hgext/keyword.py --- a/hgext/keyword.py +++ b/hgext/keyword.py @@ -89,7 +89,6 @@ from mercurial.hgweb import webcommands from mercurial.i18n import _ import os, re, shutil, tempfile -commands.optionalrepo += ' kwdemo' commands.inferrepo += ' kwexpand kwfiles kwshrink' cmdtable = {} @@ -363,7 +362,8 @@ def _kwfwrite(ui, repo, expand, *pats, * [('d', 'default', None, _('show default keyword template maps')), ('f', 'rcfile', '', _('read maps from rcfile'), _('FILE'))], - _('hg kwdemo [-d] [-f RCFILE] [TEMPLATEMAP]...')) + _('hg kwdemo [-d] [-f RCFILE] [TEMPLATEMAP]...'), + optionalrepo=True) def demo(ui, repo, *args, **opts): '''print [keywordmaps] configuration and an expansion example