diff options
author | W. Trevor King <wking@drexel.edu> | 2010-06-27 09:21:31 -0400 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2010-06-27 09:24:47 -0400 |
commit | 4ffb44509a92d8c7ea3d262923d598e86e501da0 (patch) | |
tree | 3f487aff7fe45f0dc73b2343a09d8958e4297593 /libbe | |
parent | dbc17b52969cd976dc20cd1a537810bd53db5745 (diff) | |
download | bugseverywhere-4ffb44509a92d8c7ea3d262923d598e86e501da0.tar.gz |
Fixed Monotone driver rooting for interface versions >= 8.0.
I'm not sure where the dirname manipulation came from, but it
was screwing things up ;).
Also some argument order and indentation cleanups.
Diffstat (limited to 'libbe')
-rw-r--r-- | libbe/storage/vcs/monotone.py | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/libbe/storage/vcs/monotone.py b/libbe/storage/vcs/monotone.py index 350b4f1..d95cb72 100644 --- a/libbe/storage/vcs/monotone.py +++ b/libbe/storage/vcs/monotone.py @@ -131,13 +131,9 @@ class Monotone (base.VCS): def _vcs_root(self, path): """Find the root of the deepest repository containing path.""" - if os.path.isdir(path): - dirname = os.path.dirname(path) - else: - dirname = path if self.version_cmp(8, 0) >= 0: status,output,error = self._invoke_client( - 'automate', 'get_workspace_root', cwd=dirname) + 'automate', 'get_workspace_root', cwd=path) else: mtn_dir = self._u_search_parent_directories(path, '_MTN') if mtn_dir == None: @@ -168,12 +164,13 @@ class Monotone (base.VCS): self._passphrase = '' self._u_invoke_client('db', 'init', '--db', self._db_path, cwd=path) os.mkdir(self._key_dir) - self._u_invoke_client('automate', - '--db', self._db_path, - '--keydir', self._key_dir, - 'genkey', self._key, self._passphrase) - self._invoke_client('setup', '--db', self._db_path, - '--branch', self._branch_name, cwd=path) + self._u_invoke_client( + '--db', self._db_path, + '--keydir', self._key_dir, + 'automate', 'genkey', self._key, self._passphrase) + self._invoke_client( + 'setup', '--db', self._db_path, + '--branch', self._branch_name, cwd=path) def _vcs_destroy(self): vcs_dir = os.path.join(self.repo, '_MTN') |