@matheusbsbs / matheus-bagliano / commits / d44e8cf029
Fork 0

cvsimport: catch error condition where cvs host disappears

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>

Martin Langhoff committed Nov 2, 2005 at 13:48 UTC d44e8cf0298a794648271cbff2f74a0063a672b3
1 file changed +4
git-cvsimport.perl
+4
@@ -337,6 +337,10 @@ sub file {
337 }
338 close ($fh);
339
340 + if ($res eq '') {
341 + die "Looks like the server has gone away while fetching $fn $rev -- exiting!";
342 + }
343 +
344 return ($name, $res);
345 }
346