summaryrefslogtreecommitdiff
path: root/git-svn.perl
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2008-09-01 02:45:07 (GMT)
committerEric Wong <normalperson@yhbt.net>2008-09-05 23:58:38 (GMT)
commit991255c634500fe51a70aae6a8e7c8d7b73db0cc (patch)
tree2d413575d73dde6531d7a3186f4d10775d61f4e0 /git-svn.perl
parent8598db935b653c638109aecab3e345c45d53af07 (diff)
downloadgit-991255c634500fe51a70aae6a8e7c8d7b73db0cc.zip
git-991255c634500fe51a70aae6a8e7c8d7b73db0cc.tar.gz
git-991255c634500fe51a70aae6a8e7c8d7b73db0cc.tar.bz2
git-svn: check error code of send_txstream
Not checking the error code of a function used to transform and send data makes me nervous. It currently returns "undef" on success; so die if we get any result other than "undef" because it's likely something went wrong somewhere. I really wish this function returned an MD5 like send_stream (or better yet, SHA1) for verification. Signed-off-by: Eric Wong <normalperson@yhbt.net>
Diffstat (limited to 'git-svn.perl')
-rwxr-xr-xgit-svn.perl6
1 files changed, 5 insertions, 1 deletions
diff --git a/git-svn.perl b/git-svn.perl
index fdf4e4a..2d355c1 100755
--- a/git-svn.perl
+++ b/git-svn.perl
@@ -3697,7 +3697,11 @@ sub chg_file {
my $atd = $self->apply_textdelta($fbat, $exp_a, $pool);
if (-s $fh_a) {
my $txstream = SVN::TxDelta::new ($fh_a, $fh_b, $pool);
- SVN::TxDelta::send_txstream($txstream, @$atd, $pool);
+ my $res = SVN::TxDelta::send_txstream($txstream, @$atd, $pool);
+ if (defined $res) {
+ die "Unexpected result from send_txstream: $res\n",
+ "(SVN::Core::VERSION: $SVN::Core::VERSION)\n";
+ }
} else {
my $got = SVN::TxDelta::send_stream($fh_b, @$atd, $pool);
die "Checksum mismatch\nexpected: $exp_b\ngot: $got\n"