summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0d7a6e4)
raw | patch | inline | side by side (parent: 0d7a6e4)
author | Eric Wong <normalperson@yhbt.net> | |
Sat, 25 Nov 2006 06:38:18 +0000 (22:38 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 13 Dec 2006 09:48:44 +0000 (01:48 -0800) |
Some versions of the SVN libraries cause die() to exit with 255,
and 40cf043389ef4cdf3e56e7c4268d6f302e387fa0 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>
and 40cf043389ef4cdf3e56e7c4268d6f302e387fa0 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>
git-svn.perl | patch | blob | history |
diff --git a/git-svn.perl b/git-svn.perl
index b53273eaea77c80fbfc3e1791a5eeab16c1b4c7e..e8b5c0966bf3a38fd0c55b003a36a25bad4d608f 100755 (executable)
--- a/git-svn.perl
+++ b/git-svn.perl
$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
$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";
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;
}