Branch: refs/heads/master
Home: https://github.com/openSUSE/osc2
Commit: ab99862bef8134e87a142271a8241f48f0ab3ada
https://github.com/openSUSE/osc2/commit/ab99862bef8134e87a142271a8241f48f0ab...
Author: Marcus Huewe
Date: 2012-11-16 (Fri, 16 Nov 2012)
Changed paths:
M osc/cli/description.py
Log Message:
-----------
- osc.cli.description: got rid of the "global" commands() method/dict
Now it is possible to build independent command hierarchies in a clean way
(note: building independent hierarchies were also possible before but
the commands from all hierarchies were stored in a "global" dict which
contradicts encapsulation (and might lead to name clashes)).
In order to build a new hierarchy a new "command description class"
has to be created via:
MyNewCommandDescription = build_description('NewCommandDescription', {})
The newly added build_description method takes care of creating the new
class (which inherits from AbstractCommandDescription) and its
corresponding concrete metaclass (which inherits from
AbstractSubcommandFilterMeta).