Re: CVS repository invalid revision

From: Aidan Van Dyk <aidan(at)highrise(dot)ca>
To: Christian Robottom Reis <kiko(at)canonical(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, Martin Pitt <martin(at)piware(dot)de>
Subject: Re: CVS repository invalid revision
Date: 2008-02-20 22:53:00
Message-ID: 20080220225300.GE16099@yugib.highrise.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

* Aidan Van Dyk <aidan(at)highrise(dot)ca> [080220 17:00]:

> It happens that it's choking on a bunch of the various REL7_1 tags...
> And, the fromcvs converter, which works fine, just happens to *not*
> support importing tags - go figure ;-)
>
> So, my solution - strip them all out, and low-and-behold, cvsps works
> (and thus, so does git-cvsimport).
>
> So, for people having problems with the "cvs repository", try and
> eliminate the REL7_1* tags, and see if the problems go away...
>
> Here's my ugly 30 second perl to "remove" the REL7_* tags...

I see I forgot to include it.

I've found that it's only REL7_1_BETA[23] that cause the problem...

And it seems like both those tags are taging various files from various
points in time, and such a way that cvsps loops forever...

Here' my perl to "fix" the repository and allow cvsps to work:

It's ugly, and I make no guarantee that it doesn't "corrupt" some binary
file somewhere...

#!/usr/bin/perl
my @TAGS = qw(REL7_1_BETA2 REL7_1_BETA3);
for my $file (@ARGV)
{
my $i, $o;
my @sb = stat($file);
printf "%s: %d\n", $file, $sb[7];

open(INPUT, "<:raw", $file) || die "Couldn't open $file: $!\n";
$i = sysread INPUT, $buf, $sb[7];
close INPUT;

for my $tag (@TAGS)
{
$buf =~ s/ $tag:[.0-9]*\n//es;
$buf =~ s/\n $tag:[.0-9]*;\n/;\n/es;
}

open OUTPUT, ">:raw", "$file.new";
$o = syswrite OUTPUT, $buf;
close OUTPUT;
printf "IN: %d OUT: %d\n", $i, $o;
rename ("$file.new", $file) || die "Couldn't rename: $!\n";
}

Run it over the repository like:
find CVSROOT/pgsql -name \*,v | xargs perl parse.pl

YMMV...

a.

--
Aidan Van Dyk Create like a god,
aidan(at)highrise(dot)ca command like a king,
http://www.highrise.ca/ work like a slave.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-02-20 22:59:27 Re: Getting available options
Previous Message Aidan Van Dyk 2008-02-20 22:33:07 Re: CVS repository invalid revision