git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Trouble importing from public CVS repo

From
Sean <seanlkml@sympatico.ca>
Date
Jan 4, 2008, 23:17 UTC
Message-ID
<BAYC1-PASMTP15EA2E9A1145CD66AF7C4DAE4C0@CEZ.ICE>
In-Reply-To
<477EA7F6.1010608@garzik.org>

On Fri, 04 Jan 2008 16:41:10 -0500 Jeff Garzik <jeff@garzik.org> wrote:

Show 20 quoted lines
> $ git-cvsimport -v -d:pserver:anonymous@cvs.lysator.liu.se:/cvsroot/unfs3 unfs3
> 
> produces
> 
> Initialized empty Git repository in /spare/repo/unfs3/.git/
> Running cvsps...
> connect error: Network is unreachable
> cvs rlog: Logging unfs3
> cvs rlog: Logging unfs3/Config
> cvs rlog: Logging unfs3/Extras
> cvs rlog: Logging unfs3/contrib
> cvs rlog: Logging unfs3/contrib/nfsotpclient
> cvs rlog: Logging unfs3/contrib/nfsotpclient/mountclient
> cvs rlog: Logging unfs3/contrib/rpcproxy
> cvs rlog: Logging unfs3/doc
> Fetching LICENSE   v 1.1
> New LICENSE: 1416 bytes
> Fetching Makefile.in   v 1.1
> Unknown: error
> 
Hi Jeff,

See the same problem here and it has something to do with how files are being fetched from the cvs server. I'm not much inclined to research it further, however the ugly hack below appears to allow the repo to be imported. At least importing the first 10 commits (-L 10) looked okay... Perhaps it's a clue to how the issue could be resolved properly.

HTH, Sean

diff --git a/git-cvsimport.perl b/git-cvsimport.perl
index 6d8ff93..357665d 100755
--- a/git-cvsimport.perl
+++ b/git-cvsimport.perl
@@ -421,7 +421,7 @@ sub _line {
 			$res += $self->_fetchfile($fh, $cnt);
 		} else {
 			chomp $line;
-			if ($line eq "ok") {
+			if ($line eq "ok" or $line =~ /^error/i) {
 				# print STDERR "S: ok (".length($res).")\n";
 				return $res;
 			} elsif ($line =~ s/^E //) {
-- 
1.5.4.rc2.17.g257f
Previous: Jeff GarzikNext: Jeff Garzik
Message 2 of 3 in “Trouble importing from public CVS repo”
  1. Jeff GarzikJan 4, 2008
  2. SeanJan 4, 2008
  3. Jeff GarzikJan 5, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.