diff options
author | W. Trevor King <wking@drexel.edu> | 2009-12-13 20:35:14 -0500 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2009-12-13 20:35:14 -0500 |
commit | c83e48bb2e8ae304f629d7d6ae47fb97b5b325ff (patch) | |
tree | 154b9c32c3866fc781600e79f755c178b1f43e90 /libbe/storage/vcs | |
parent | 86b5fba698855cb4709d6f009e84b4002361f0db (diff) | |
download | bugseverywhere-c83e48bb2e8ae304f629d7d6ae47fb97b5b325ff.tar.gz |
Check for repo existence before initializing VCS
Diffstat (limited to 'libbe/storage/vcs')
-rw-r--r-- | libbe/storage/vcs/base.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libbe/storage/vcs/base.py b/libbe/storage/vcs/base.py index fc3427a..662fc30 100644 --- a/libbe/storage/vcs/base.py +++ b/libbe/storage/vcs/base.py @@ -481,9 +481,9 @@ os.listdir(self.get_path("bugs")): path = os.path.abspath('.') return path - def _vcs_init(self): + def _vcs_init(self, path): """ - Begin versioning the tree based at self.repo. + Begin versioning the tree based at path. """ pass @@ -615,6 +615,8 @@ os.listdir(self.get_path("bugs")): Begin versioning the tree based at self.repo. Also roots the vcs at path. """ + if not os.path.exists(self.repo) or not os.path.isdir(self.repo): + raise VCSUnableToRoot(self) self._vcs_init(self.repo) self.root() os.mkdir(self.be_dir) |