diff options
author | Chris Ball <cjb@laptop.org> | 2009-10-06 10:56:47 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2009-10-06 10:56:47 -0400 |
commit | 429e33fb4c7be8daa791fb744a14024ef27a72c2 (patch) | |
tree | 1a4b926e19d8a4f41c91c49a3bd1a33fc65f7a72 /libbe/vcs.py | |
parent | a98bc33f0c1b4a5ade5366b84f1d451d89491a9f (diff) | |
parent | 5ccc639e7c04abc97db15eb15677a256e9400b44 (diff) | |
download | bugseverywhere-429e33fb4c7be8daa791fb744a14024ef27a72c2.tar.gz |
Fix darcs testsuite failure
Diffstat (limited to 'libbe/vcs.py')
-rw-r--r-- | libbe/vcs.py | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/libbe/vcs.py b/libbe/vcs.py index da1f800..7b506e8 100644 --- a/libbe/vcs.py +++ b/libbe/vcs.py @@ -124,13 +124,12 @@ class VCS(object): self._duplicateBasedir = None self._duplicateDirname = None self.encoding = encoding - - def _vcs_help(self): + self.version = self._get_version() + def _vcs_version(self): """ - Return the command help string. - (Allows a simple test to see if the client is installed.) + Return the VCS version string. """ - pass + return "0.0" def _vcs_detect(self, path=None): """ Detect whether a directory is revision controlled with this VCS. @@ -229,15 +228,21 @@ class VCS(object): specified revision does not exist. """ return None - def installed(self): + def _get_version(self): try: - self._vcs_help() - return True + ret = self._vcs_version() + return ret except OSError, e: if e.errno == errno.ENOENT: - return False + return None + else: + raise OSError, e except CommandError: - return False + return None + def installed(self): + if self.version != None: + return True + return False def detect(self, path="."): """ Detect whether a directory is revision controlled with this VCS. |