aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Langhoff <martin@catalyst.net.nz>2005-11-02 13:48:22 +1300
committerJunio C Hamano <junkio@cox.net>2005-11-01 16:57:14 -0800
commitd44e8cf0298a794648271cbff2f74a0063a672b3 (patch)
tree804fbd681d434901296742668296c822cd6d21fe
parent319f8b3da6858f78282de9483be7b27b4bb1ffba (diff)
downloadgit-d44e8cf0298a794648271cbff2f74a0063a672b3.tar.gz
git-d44e8cf0298a794648271cbff2f74a0063a672b3.tar.xz
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>
-rwxr-xr-xgit-cvsimport.perl4
1 files changed, 4 insertions, 0 deletions
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);
}