diff options
author | W. Trevor King <wking@drexel.edu> | 2008-12-04 18:33:33 -0500 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2008-12-04 18:33:33 -0500 |
commit | 986e46aa72a2fc5086d2bf3232b7e71b9184e96a (patch) | |
tree | f4634bc4c27b60e7c7ba07cd3b3b6b400a789228 /libbe | |
parent | f1359fd35716840554b8e7f7606285c0c95d3d82 (diff) | |
download | bugseverywhere-986e46aa72a2fc5086d2bf3232b7e71b9184e96a.tar.gz |
Fixed lack of user_id caching in bugdir.BugDir
Diffstat (limited to 'libbe')
-rw-r--r-- | libbe/bugdir.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/libbe/bugdir.py b/libbe/bugdir.py index 98110dd..7885224 100644 --- a/libbe/bugdir.py +++ b/libbe/bugdir.py @@ -162,10 +162,12 @@ class BugDir (list, settings_object.SavedSettingsObject): check_fn=_check_encoding) def encoding(): return {} + def _setup_user_id(self, user_id): + self.rcs.user_id = user_id def _guess_user_id(self): return self.rcs.get_user_id() def _set_user_id(self, old_user_id, new_user_id): - self.rcs.user_id = new_user_id + self._setup_user_id(new_user_id) self._prop_save_settings(old_user_id, new_user_id) @_versioned_property(name="user_id", @@ -283,7 +285,7 @@ settings easy. Don't set this attribute. Set .rcs instead, and if rcs == None: rcs = self._guess_rcs(allow_rcs_init) self.rcs = rcs - user_id = self.rcs.get_user_id() + self._setup_user_id(self.user_id) def _find_root(self, path): """ @@ -351,9 +353,7 @@ settings easy. Don't set this attribute. Set .rcs instead, and self.load_settings() self.rcs = rcs.rcs_by_name(self.rcs_name) - self._setup_encoding(self.encoding) - self._setup_severities(self.severities) - self._setup_status(self.active_status, self.inactive_status) + self._setup_user_id(self.user_id) def load_all_bugs(self): "Warning: this could take a while." @@ -372,6 +372,10 @@ settings easy. Don't set this attribute. Set .rcs instead, and def load_settings(self): self.settings = self._get_settings(self.get_path("settings")) self._setup_saved_settings() + self._setup_user_id(self.user_id) + self._setup_encoding(self.encoding) + self._setup_severities(self.severities) + self._setup_status(self.active_status, self.inactive_status) def _get_settings(self, settings_path): allow_no_rcs = not self.rcs.path_in_root(settings_path) |