Skip to content

Commit

Permalink
cvsimport: catch error condition where cvs host disappears
Browse files Browse the repository at this point in the history
Add error handling for cases where the cvs server goes away unexpectedly.
While I don't know why the cvs server is so erratic, we should definitely
exit here before committing bogus files.

Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Martin Langhoff authored and Junio C Hamano committed Nov 2, 2005
1 parent 319f8b3 commit d44e8cf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions git-cvsimport.perl
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,10 @@ sub file {
}
close ($fh);

if ($res eq '') {
die "Looks like the server has gone away while fetching $fn $rev -- exiting!";
}

return ($name, $res);
}

Expand Down

0 comments on commit d44e8cf

Please sign in to comment.