{"thread":{"id":"11477","subject":"Trouble importing from public CVS repo","startedAt":"2008-01-04T21:41:10Z","lastAt":"2008-01-05T00:40:26Z","messageCount":3,"participants":["Jeff Garzik","Sean"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"64469","messageId":"477EA7F6.1010608@garzik.org","threadId":"11477","inReplyTo":null,"subject":"Trouble importing from public CVS repo","fromName":"Jeff Garzik","fromEmail":"jeff@garzik.org","sentAt":"2008-01-04T21:41:10Z","receivedAt":"2008-01-04T21:41:10Z","isPatch":false,"sender":{"key":"jeff@garzik.org","avatar":null},"body":"I'm trying to convert this public repo into a git repository:\n\n    :pserver:anonymous@cvs.lysator.liu.se:/cvsroot/unfs3\n\ncvsps seems to produce a nice long list of patchesets for the \"unfs3\" \nmodule, and running\n\n   cvs -d:pserver:anonymous@cvs.lysator.liu.se:/cvsroot/unfs3 co -P unfs3\n\nworks as expected.  However, running\n\n   [jgarzik@core unfs3]$ git-cvsimport -v \n-d:pserver:anonymous@cvs.lysator.liu.se:/cvsroot/unfs3 unfs3\n\nproduces\n\nInitialized empty Git repository in /spare/repo/unfs3/.git/\nRunning cvsps...\nconnect error: Network is unreachable\ncvs rlog: Logging unfs3\ncvs rlog: Logging unfs3/Config\ncvs rlog: Logging unfs3/Extras\ncvs rlog: Logging unfs3/contrib\ncvs rlog: Logging unfs3/contrib/nfsotpclient\ncvs rlog: Logging unfs3/contrib/nfsotpclient/mountclient\ncvs rlog: Logging unfs3/contrib/rpcproxy\ncvs rlog: Logging unfs3/doc\nFetching LICENSE   v 1.1\nNew LICENSE: 1416 bytes\nFetching Makefile.in   v 1.1\nUnknown: error\n\nThis machines and package (git-cvs-1.5.3.3-3.fc7) work just fine with a \nlarge number of other CVS repositories [nice work].\n\n\tJeff\n"},{"id":"64474","messageId":"BAYC1-PASMTP15EA2E9A1145CD66AF7C4DAE4C0@CEZ.ICE","threadId":"11477","inReplyTo":"477EA7F6.1010608@garzik.org","subject":"Re: Trouble importing from public CVS repo","fromName":"Sean","fromEmail":"seanlkml@sympatico.ca","sentAt":"2008-01-04T23:17:59Z","receivedAt":"2008-01-04T23:17:59Z","isPatch":false,"sender":{"key":"seanlkml@sympatico.ca","avatar":"https://gravatar.com/avatar/f92923f54fc08c401fc59b71829d4b89e9b8087fbba45ff87c82e6a83aee02ae?d=mp&s=160"},"body":"On Fri, 04 Jan 2008 16:41:10 -0500\nJeff Garzik <jeff@garzik.org> wrote:\n\n> $ git-cvsimport -v -d:pserver:anonymous@cvs.lysator.liu.se:/cvsroot/unfs3 unfs3\n> \n> produces\n> \n> Initialized empty Git repository in /spare/repo/unfs3/.git/\n> Running cvsps...\n> connect error: Network is unreachable\n> cvs rlog: Logging unfs3\n> cvs rlog: Logging unfs3/Config\n> cvs rlog: Logging unfs3/Extras\n> cvs rlog: Logging unfs3/contrib\n> cvs rlog: Logging unfs3/contrib/nfsotpclient\n> cvs rlog: Logging unfs3/contrib/nfsotpclient/mountclient\n> cvs rlog: Logging unfs3/contrib/rpcproxy\n> cvs rlog: Logging unfs3/doc\n> Fetching LICENSE   v 1.1\n> New LICENSE: 1416 bytes\n> Fetching Makefile.in   v 1.1\n> Unknown: error\n> \n\nHi Jeff,\n\nSee the same problem here and it has something to do with how files are being fetched\nfrom the cvs server.  I'm not much inclined to research it further, however the ugly hack\nbelow appears to allow the repo to be imported.  At least importing the first 10 commits\n(-L 10) looked okay...  Perhaps it's a clue to how the issue could be resolved properly.\n\nHTH,\nSean\n\ndiff --git a/git-cvsimport.perl b/git-cvsimport.perl\nindex 6d8ff93..357665d 100755\n--- a/git-cvsimport.perl\n+++ b/git-cvsimport.perl\n@@ -421,7 +421,7 @@ sub _line {\n \t\t\t$res += $self->_fetchfile($fh, $cnt);\n \t\t} else {\n \t\t\tchomp $line;\n-\t\t\tif ($line eq \"ok\") {\n+\t\t\tif ($line eq \"ok\" or $line =~ /^error/i) {\n \t\t\t\t# print STDERR \"S: ok (\".length($res).\")\\n\";\n \t\t\t\treturn $res;\n \t\t\t} elsif ($line =~ s/^E //) {\n-- \n1.5.4.rc2.17.g257f\n"},{"id":"64482","messageId":"477ED1FA.1070102@garzik.org","threadId":"11477","inReplyTo":"BAYC1-PASMTP15EA2E9A1145CD66AF7C4DAE4C0@CEZ.ICE","subject":"Re: Trouble importing from public CVS repo","fromName":"Jeff Garzik","fromEmail":"jeff@garzik.org","sentAt":"2008-01-05T00:40:26Z","receivedAt":"2008-01-05T00:40:26Z","isPatch":false,"sender":{"key":"jeff@garzik.org","avatar":null},"body":"Sean wrote:\n> diff --git a/git-cvsimport.perl b/git-cvsimport.perl\n> index 6d8ff93..357665d 100755\n> --- a/git-cvsimport.perl\n> +++ b/git-cvsimport.perl\n> @@ -421,7 +421,7 @@ sub _line {\n>  \t\t\t$res += $self->_fetchfile($fh, $cnt);\n>  \t\t} else {\n>  \t\t\tchomp $line;\n> -\t\t\tif ($line eq \"ok\") {\n> +\t\t\tif ($line eq \"ok\" or $line =~ /^error/i) {\n>  \t\t\t\t# print STDERR \"S: ok (\".length($res).\")\\n\";\n>  \t\t\t\treturn $res;\n>  \t\t\t} elsif ($line =~ s/^E //) {\n\nKick ass, this local hack worked quite well.  Thanks :)\n\n\tJeff\n"}]}