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>
This commit is contained in:
Martin Langhoff 2005-11-02 13:48:22 +13:00 коммит произвёл Junio C Hamano
Родитель 319f8b3da6
Коммит d44e8cf029
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -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);
}