From 3630d9386e674152e2e1363f45af2131bad8561a Mon Sep 17 00:00:00 2001 From: Brian Matherly Date: Sun, 1 Jun 2008 20:51:00 +0000 Subject: [PATCH] Check is RCS is installed (this is an improvement on r10775) svn: r10777 --- src/DbManager.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/DbManager.py b/src/DbManager.py index ee69fa0cb..b7a2f1da0 100644 --- a/src/DbManager.py +++ b/src/DbManager.py @@ -44,12 +44,12 @@ import logging LOG = logging.getLogger(".DbManager") if os.sys.platform == "win32": - RCS_FOUND = os.system("rcs -V >nul 2>nul") == 0 - if RCS_FOUND and not os.environ.has_key("TZ"): + _RCS_FOUND = os.system("rcs -V >nul 2>nul") == 0 + if _RCS_FOUND and not os.environ.has_key("TZ"): # RCS requires the "TZ" variable be set. os.environ["TZ"] = str(time.timezone) else: - RCS_FOUND = os.system("rcs -V >/dev/null 2>/dev/null") == 0 + _RCS_FOUND = os.system("rcs -V >/dev/null 2>/dev/null") == 0 #------------------------------------------------------------------------- # @@ -324,7 +324,7 @@ class DbManager(CLIDbManager): self.top.connect('drag_motion', drag_motion) self.top.connect('drag_drop', drop_cb) - if RCS_FOUND: + if _RCS_FOUND: self.rcs.connect('clicked', self.__rcs) def __button_press(self, obj, event): @@ -384,11 +384,11 @@ class DbManager(CLIDbManager): if store.get_value(node, STOCK_COL) == gtk.STOCK_OPEN: self.connect.set_sensitive(False) - if RCS_FOUND: + if _RCS_FOUND: self.rcs.show() else: self.connect.set_sensitive(not is_rev) - if RCS_FOUND and is_rev: + if _RCS_FOUND and is_rev: self.rcs.show() else: self.rcs.hide() @@ -965,7 +965,7 @@ def find_revisions(name): rev = re.compile("\s*revision\s+([\d\.]+)") date = re.compile("date:\s+(\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d)[-+]\d\d;") - if not os.path.isfile(name): + if not os.path.isfile(name) or not _RCS_FOUND: return [] rlog = [ "rlog", "-x,v", "-zLT" , name ]