Skip to content

Commit

Permalink
git-svn: exit with status 1 for test failures
Browse files Browse the repository at this point in the history
Some versions of the SVN libraries cause die() to exit with 255,
and 40cf043 tightened up
test_expect_failure to reject return values >128.

Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Eric Wong authored and Junio C Hamano committed Dec 13, 2006
1 parent 0d7a6e4 commit b42a044
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions git-svn.perl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
$ENV{LC_ALL} = 'C';
$| = 1; # unbuffer STDOUT

sub fatal (@) { print STDERR $@; exit 1 }
# If SVN:: library support is added, please make the dependencies
# optional and preserve the capability to use the command-line client.
# use eval { require SVN::... } to make it lazy load
Expand Down Expand Up @@ -571,7 +572,7 @@ sub commit_lib {
$no = 1;
}
}
close $fh or croak $?;
close $fh or exit 1;
if (! defined $r_new && ! defined $cmt_new) {
unless ($no) {
die "Failed to parse revision information\n";
Expand Down Expand Up @@ -873,13 +874,16 @@ sub commit_diff {
print "Committed $_[0]\n";
}, @lock)
);
my $mods = libsvn_checkout_tree($ta, $tb, $ed);
if (@$mods == 0) {
print "No changes\n$ta == $tb\n";
$ed->abort_edit;
} else {
$ed->close_edit;
}
eval {
my $mods = libsvn_checkout_tree($ta, $tb, $ed);
if (@$mods == 0) {
print "No changes\n$ta == $tb\n";
$ed->abort_edit;
} else {
$ed->close_edit;
}
};
fatal "$@\n" if $@;
$_message = $_file = undef;
return $rev_committed;
}
Expand Down

0 comments on commit b42a044

Please sign in to comment.