Mercurial > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
28312:24f1d3c70c41 | 28313:aa73d6a5d9ea |
---|---|
26 import commandserver | 26 import commandserver |
27 | 27 |
28 table = {} | 28 table = {} |
29 | 29 |
30 command = cmdutil.command(table) | 30 command = cmdutil.command(table) |
31 | |
32 # Space delimited list of commands that don't require local repositories. | |
33 # This should be populated by passing norepo=True into the @command decorator. | |
34 norepo = '' | |
35 # Space delimited list of commands that optionally require local repositories. | |
36 # This should be populated by passing optionalrepo=True into the @command | |
37 # decorator. | |
38 optionalrepo = '' | |
39 # Space delimited list of commands that will examine arguments looking for | |
40 # a repository. This should be populated by passing inferrepo=True into the | |
41 # @command decorator. | |
42 inferrepo = '' | |
43 | 31 |
44 # label constants | 32 # label constants |
45 # until 3.5, bookmarks.current was the advertised name, not | 33 # until 3.5, bookmarks.current was the advertised name, not |
46 # bookmarks.active, so we must use both to avoid breaking old | 34 # bookmarks.active, so we must use both to avoid breaking old |
47 # custom styles | 35 # custom styles |