aboutsummaryrefslogtreecommitdiff
path: root/git-svn.perl
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2006-11-28 14:06:05 -0800
committerJunio C Hamano <junkio@cox.net>2006-11-28 14:13:43 -0800
commitdad73c0bb9f33323ec1aacf560a6263f1d85f81a (patch)
tree9f9696eaf73137674c27552bbb8599c40256870d /git-svn.perl
parentc3e43938839752b48ff3a36862ae59f1cd1e630d (diff)
downloadgit-dad73c0bb9f33323ec1aacf560a6263f1d85f81a.tar.gz
git-dad73c0bb9f33323ec1aacf560a6263f1d85f81a.tar.xz
git-svn: error out when the SVN connection fails during a fetch
finish_report does seem to return a useful value indicating success or failure, so we'll just set a flag when close_edit is called (it is not called on failures, nor is abort_edit) and check the flag before proceeding. Thanks to Pazu for pointing this out. Signed-off-by: Eric Wong <normalperson@yhbt.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-xgit-svn.perl9
1 files changed, 8 insertions, 1 deletions
diff --git a/git-svn.perl b/git-svn.perl
index 9b86d9126..cefa7b021 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -2939,6 +2939,9 @@ sub libsvn_fetch_delta {
$reporter->set_path('', $last_rev, 0, @lock, $pool);
$reporter->finish_report($pool);
$pool->clear;
+ unless ($ed->{git_commit_ok}) {
+ die "SVN connection failed somewhere...\n";
+ }
libsvn_log_entry($rev, $author, $date, $msg, [$last_commit]);
}
@@ -3193,6 +3196,9 @@ sub libsvn_new_tree {
$reporter->set_path('', $rev, 1, @lock, $pool);
$reporter->finish_report($pool);
$pool->clear;
+ unless ($ed->{git_commit_ok}) {
+ die "SVN connection failed somewhere...\n";
+ }
} else {
open my $gui, '| git-update-index -z --index-info' or croak $!;
libsvn_traverse($gui, '', $SVN->{svn_path}, $rev);
@@ -3506,7 +3512,8 @@ sub abort_edit {
sub close_edit {
my $self = shift;
- close $self->{gui} or croak;
+ close $self->{gui} or croak $!;
+ $self->{git_commit_ok} = 1;
$self->SUPER::close_edit(@_);
}