Mercurial > public > mercurial-scm > hg-stable
diff mercurial/commands.py @ 28313:aa73d6a5d9ea
dispatch: store norepo/optionalrepo/inferrepo attributes in function (API)
This can eliminate import cycles and ugly push/pop of global variables at
_checkshellalias(). Attributes of aliascmd are directly accessible.
Because norepo/optionalrepo/inferrepo lists aren't populated, extensions
examining them no longer work. That's why this patch removes these lists
to signal the API incompatibility.
This breaks 3rd-party extensions that are yet to be ported to @command
decorator.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Fri, 01 Jan 2016 22:16:25 +0900 |
parents | 5d9578d9ad1a |
children | ffc693f87148 |
line wrap: on
line diff
--- a/mercurial/commands.py Sat Jan 09 20:04:03 2016 +0900 +++ b/mercurial/commands.py Fri Jan 01 22:16:25 2016 +0900 @@ -29,18 +29,6 @@ command = cmdutil.command(table) -# Space delimited list of commands that don't require local repositories. -# This should be populated by passing norepo=True into the @command decorator. -norepo = '' -# Space delimited list of commands that optionally require local repositories. -# This should be populated by passing optionalrepo=True into the @command -# decorator. -optionalrepo = '' -# Space delimited list of commands that will examine arguments looking for -# a repository. This should be populated by passing inferrepo=True into the -# @command decorator. -inferrepo = '' - # label constants # until 3.5, bookmarks.current was the advertised name, not # bookmarks.active, so we must use both to avoid breaking old