diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2012-09-25 16:50:01 +0100 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2012-09-25 19:03:36 +0100 |
commit | 1879ef5ad4999928f396e65486599e4a41f53ddc (patch) | |
tree | dc4423e16b1e2a7236e35c7748f937b6aceeb186 /morphlib | |
parent | ab1fbf2e23fc05ad410193979dd7b15d62ac4675 (diff) | |
download | morph-1879ef5ad4999928f396e65486599e4a41f53ddc.tar.gz |
morph merge: Better errors from checkout_repository()
Diffstat (limited to 'morphlib')
-rw-r--r-- | morphlib/plugins/branch_and_merge_plugin.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/morphlib/plugins/branch_and_merge_plugin.py b/morphlib/plugins/branch_and_merge_plugin.py index 28c09505..9a22e59d 100644 --- a/morphlib/plugins/branch_and_merge_plugin.py +++ b/morphlib/plugins/branch_and_merge_plugin.py @@ -480,10 +480,16 @@ class BranchAndMergePlugin(cliapp.Plugin): if self.resolve_ref(repo_dir, ref) is None: self.log_change(repo, 'branch "%s" created from "%s"' % (ref, parent_ref)) - self.app.runcmd(['git', 'checkout', '-b', ref], cwd=repo_dir) + command = ['git', 'checkout', '-b', ref] else: # git copes even if the system_branch ref is already checked out - self.app.runcmd(['git', 'checkout', ref], cwd=repo_dir) + command = ['git', 'checkout', ref] + + status, output, error = self.app.runcmd_unchecked( + command, cwd=repo_dir) + if status != 0: + raise cliapp.AppException('Command failed: %s in repo %s\n%s' % + (' '.join(command), repo, error)) return repo_dir def edit_stratum(self, system_branch, branch_dir, branch_root_dir, |