aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/bugdir.py
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2009-12-03 22:05:23 -0500
committerW. Trevor King <wking@drexel.edu>2009-12-03 22:05:23 -0500
commit8bcbda7e3c022b6d63d86123b3aacabbe6c21ec1 (patch)
treee80764f06954e3017b950f17a02e0e58d33c1a3d /libbe/bugdir.py
parent864d694c818374ceb4c8e3b34612b0481de17f8d (diff)
downloadbugseverywhere-8bcbda7e3c022b6d63d86123b3aacabbe6c21ec1.tar.gz
Don't necessarily initialize a new VCS in BugDir.load_settings().
We may already have the right type, in which case, don't mess with it. This speeds up bugdir loading a bit more: $ time be list > /dev/null real 0m1.245s user 0m1.116s sys 0m0.124s
Diffstat (limited to 'libbe/bugdir.py')
-rw-r--r--libbe/bugdir.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/libbe/bugdir.py b/libbe/bugdir.py
index d78e761..7005181 100644
--- a/libbe/bugdir.py
+++ b/libbe/bugdir.py
@@ -413,8 +413,9 @@ settings easy. Don't set this attribute. Set .vcs instead, and
self._setup_encoding(self.encoding)
self._setup_severities(self.severities)
self._setup_status(self.active_status, self.inactive_status)
- self.vcs = vcs.vcs_by_name(self.vcs_name)
- self._setup_user_id(self.user_id)
+ if self.vcs_name != self.vcs.name:
+ self.vcs = vcs.vcs_by_name(self.vcs_name)
+ self._setup_user_id(self.user_id)
def save_settings(self):
settings = self._get_saved_settings()