From 4ffb44509a92d8c7ea3d262923d598e86e501da0 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sun, 27 Jun 2010 09:21:31 -0400 Subject: [PATCH] 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. --- libbe/storage/vcs/monotone.py | 19 ++++++++----------- 1 file 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') -- 2.26.2