Skip to contentSkip to conversation

Trouble importing from public CVS repo

DISCUSSION Jeff Garzik 2 participants 3 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

I'm trying to convert this public repo into a git repository:

:pserver:[email protected]:/cvsroot/unfs3

cvsps seems to produce a nice long list of patchesets for the "unfs3" module, and running

cvs -d:pserver:[email protected]:/cvsroot/unfs3 co -P unfs3

works as expected. However, running

[jgarzik@core unfs3]$ git-cvsimport -v
-d:pserver:[email protected]:/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

This machines and package (git-cvs-1.5.3.3-3.fc7) work just fine with a large number of other CVS repositories [nice work].

Jeff

#1 lore raw
Quoted 4 lines · On Fri, 04 Jan 2008 16:41:10 -0500 Jeff Garzik <[email protected]> wrote:
$ git-cvsimport -v -d:pserver:[email protected]:/cvsroot/unfs3 unfs3

produces

Quoted 16 lines

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

git-cvsimport.perl +1 -1
index 6d8ff93..357665d 100755
@@ -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 //) {
Signature · 1 line
1.5.4.rc2.17.g257f
#2 lore raw

git-cvsimport.perl sub _line { · line 427

Quoted 13 lines · Sean
git-cvsimport.perl +1 -1
index 6d8ff93..357665d 100755
@@ -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 //) {

Kick ass, this local hack worked quite well. Thanks :)

Jeff