Git development
 help / color / mirror / Atom feed
* [PATCH] cvsimport: catch error condition where cvs host disappears
@ 2005-11-02  0:48 Martin Langhoff
  0 siblings, 0 replies; only message in thread
From: Martin Langhoff @ 2005-11-02  0:48 UTC (permalink / raw)
  To: git; +Cc: Martin Langhoff

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>


---

 git-cvsimport.perl |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

applies-to: 5184f41aebc18fdd90c27b76b8fb230fda58fb84
2f441d6598e78b59181a084f9db5be7993971602
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);
 }
 
---
0.99.8.GIT

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2005-11-02  0:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-02  0:48 [PATCH] cvsimport: catch error condition where cvs host disappears Martin Langhoff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox