From 8bcbda7e3c022b6d63d86123b3aacabbe6c21ec1 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 3 Dec 2009 22:05:23 -0500 Subject: [PATCH] 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 --- libbe/bugdir.py | 5 +++-- 1 file 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() -- 2.26.2