aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/bugdir.py
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2008-12-04 09:54:39 -0500
committerW. Trevor King <wking@drexel.edu>2008-12-04 09:54:39 -0500
commitca347e86bef7bbdd0d1007beaf283f29ec1bbdff (patch)
tree221489938cd49ded27fee624ddc835c58a420797 /libbe/bugdir.py
parent83e320a61eb74dab6eddfdda010f34fa42eedc0c (diff)
downloadbugseverywhere-ca347e86bef7bbdd0d1007beaf283f29ec1bbdff.tar.gz
Per-tree settings now passed into bug module.
becommands/severity gets the configured settings appropriately. Todo: adjust setting-validation to compare against the current values. setup becommands/severity to --complete severities.
Diffstat (limited to 'libbe/bugdir.py')
-rw-r--r--libbe/bugdir.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/libbe/bugdir.py b/libbe/bugdir.py
index d554ebe..cdb4cf5 100644
--- a/libbe/bugdir.py
+++ b/libbe/bugdir.py
@@ -218,8 +218,15 @@ settings easy. Don't set this attribute. Set .rcs instead, and
@doc_property(doc="A dict of (bug-uuid, bug-instance) pairs.")
def _bug_map(): return {}
+ def _setup_severities(self, severities):
+ if severities != None and severities != settings_object.EMPTY:
+ bug.load_severities(severities)
+ def _set_severities(self, old_severities, new_severities):
+ self._setup_severities(new_severities)
+ self._prop_save_settings(old_severities, new_severities)
@_versioned_property(name="severities",
- doc="The allowed bug severities and their descriptions.")
+ doc="The allowed bug severities and their descriptions.",
+ change_hook=_set_severities)
def severities(): return {}
@@ -322,6 +329,7 @@ settings easy. Don't set this attribute. Set .rcs instead, and
self.rcs = rcs.rcs_by_name(self.rcs_name)
self._setup_encoding(self.encoding)
+ self._setup_severities(self.severities)
def load_all_bugs(self):
"Warning: this could take a while."