summaryrefslogtreecommitdiff
path: root/git-cvsimport.perl
diff options
context:
space:
mode:
authorMartin Langhoff <martin@catalyst.net.nz>2005-11-02 00:48:22 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-11-02 00:57:14 (GMT)
commitd44e8cf0298a794648271cbff2f74a0063a672b3 (patch)
tree804fbd681d434901296742668296c822cd6d21fe /git-cvsimport.perl
parent319f8b3da6858f78282de9483be7b27b4bb1ffba (diff)
downloadgit-d44e8cf0298a794648271cbff2f74a0063a672b3.zip
git-d44e8cf0298a794648271cbff2f74a0063a672b3.tar.gz
git-d44e8cf0298a794648271cbff2f74a0063a672b3.tar.bz2
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>
Diffstat (limited to 'git-cvsimport.perl')
-rwxr-xr-xgit-cvsimport.perl4
1 files changed, 4 insertions, 0 deletions
diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index bbb83fb..e3cad5a 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);
}