From: Martin Langhoff Date: Wed, 2 Nov 2005 00:48:22 +0000 (+1300) Subject: cvsimport: catch error condition where cvs host disappears X-Git-Tag: v0.99.9b^2~3 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=d44e8cf0298a794648271cbff2f74a0063a672b3;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/git-cvsimport.perl b/git-cvsimport.perl index bbb83fb71..e3cad5a1c 100755 --- a/git-cvsimport.perl +++ b/git-cvsimport.perl @@ -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); }