commit b4c8c38e12d11eb232305949c5d42d5df5e8f5c8
Author: Nicolas Vigier <boklm(a)torproject.org>
Date: Mon Mar 5 14:47:03 2018 +0100
Bug 25422: Give more details in "Cannot checkout" errors
Print stderr from the git/hg command if the checkout failed.
---
lib/RBM.pm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/RBM.pm b/lib/RBM.pm
index 3b19ca9..f987130 100644
--- a/lib/RBM.pm
+++ b/lib/RBM.pm
@@ -472,7 +472,7 @@ sub execute {
git_clone_fetch_chdir($project, $options);
my ($stdout, $stderr, $success, $exit_code)
= capture_exec('git', 'checkout', $git_hash);
- exit_error "Cannot checkout $git_hash" unless $success;
+ exit_error "Cannot checkout $git_hash:\n$stderr" unless $success;
if (project_config($project, 'git_submodule', $options)) {
($stdout, $stderr, $success, $exit_code)
= capture_exec('git', 'submodule', 'update', '--init');
@@ -485,7 +485,7 @@ sub execute {
hg_clone_fetch_chdir($project, $options);
my ($stdout, $stderr, $success, $exit_code)
= capture_exec('hg', 'update', '-C', $hg_hash);
- exit_error "Cannot checkout $hg_hash" unless $success;
+ exit_error "Cannot checkout $hg_hash:\n$stderr" unless $success;
}
my ($stdout, $stderr, $success, $exit_code)
= run_script($project, $cmd, \&capture_exec);