Utility to strip $Log from RCS checked-out files
I'm dealing with a massive RCS repository, for various reasons, and
I'd like a clean little utility to strip the $Log$ entries out to ease
diffing files against backup files, and to ease integration to a new
Subversion system (which does not support $Log$
Does anyone have a clean utility for this? I don't want them retained,
the information is in the RCS logs and will be in the subversion logs,
I just want them yanked out of text files, C source code, etc.
Otherwise, I'll have to spend some time writing it in perl, and I
really don't feel like spending the time.
Re: Utility to strip $Log from RCS checked-out files
On 27 May, 15:21, Nico Kadel-Garcia <nka...@gmail.com> wrote:[color=blue]
> I'm dealing with a massive RCS repository, for various reasons, and
> I'd like a clean little utility to strip the $Log$ entries out to ease
> diffing files against backup files, and to ease integration to a new
> Subversion system (which does not support $Log$
>
> Does anyone have a clean utility for this? I don't want them retained,
> the information is in the RCS logs and will be in the subversion logs,
> I just want them yanked out of text files, C source code, etc.
> Otherwise, I'll have to spend some time writing it in perl, and I
> really don't feel like spending the time.[/color]
Any luck in finding such a utility? I'm in need of something similar.
thanks,
Fred
Re: Utility to strip $Log from RCS checked-out files
On 6 Jun, 15:37, fvau...@gmail.com wrote:[color=blue]
> On 27 May, 15:21, Nico Kadel-Garcia <nka...@gmail.com> wrote:
>[color=green]
> > I'm dealing with a massive RCS repository, for various reasons, and
> > I'd like a clean little utility to strip the $Log$ entries out to ease
> > diffing files against backup files, and to ease integration to a new
> > Subversion system (which does not support $Log$[/color]
>[color=green]
> > Does anyone have a clean utility for this? I don't want them retained,
> > the information is in the RCS logs and will be in the subversion logs,
> > I just want them yanked out of text files, C source code, etc.
> > Otherwise, I'll have to spend some time writing it in perl, and I
> > really don't feel like spending the time.[/color]
>
> Any luck in finding such a utility? I'm in need of something similar.
>
> thanks,
> Fred[/color]
I was able to write a simple Perl script that uses "grep -v" to filter
out keywords (see inline below). The script was written for Windows,
but could be easily adapted for Linux.
use Getopt::Long;
GetOptions("list=s" => \$list);
open(FILE, $list) or die "can't open file $list -- $!";
while( <FILE> )
{
$file = $_;
chomp($file);
$file = "\"" . "$file" . "\"";
print "$file \n";
print "grep -v \$Header $file > temp.txt \n";
`grep -v \$Header $file > temp.txt `;
print "copy temp.txt $file /y \n";
`copy temp.txt $file /y`;
}
close(FILE);
Re: Utility to strip $Log from RCS checked-out files
On 9 Jun, 21:37, fvau...@gmail.com wrote:[color=blue]
> On 6 Jun, 15:37, fvau...@gmail.com wrote:
>
>
>
>
>[color=green]
> > On 27 May, 15:21, Nico Kadel-Garcia <nka...@gmail.com> wrote:[/color]
>[color=green][color=darkred]
> > > I'm dealing with a massive RCS repository, for various reasons, and
> > > I'd like a clean little utility to strip the $Log$ entries out to ease
> > > diffing files against backup files, and to ease integration to a new
> > > Subversion system (which does not support $Log$[/color][/color]
>[color=green][color=darkred]
> > > Does anyone have a clean utility for this? I don't want them retained,
> > > the information is in the RCS logs and will be in the subversion logs,
> > > I just want them yanked out of text files, C source code, etc.
> > > Otherwise, I'll have to spend some time writing it in perl, and I
> > > really don't feel like spending the time.[/color][/color]
>[color=green]
> > Any luck in finding such a utility? I'm in need of something similar.[/color]
>[color=green]
> > thanks,
> > Fred[/color]
>
> I was able to write a simple Perl script that uses "grep -v" to filter
> out keywords (see inline below). The script was written for Windows,
> but could be easily adapted for Linux.
>
> use Getopt::Long;
>
> GetOptions("list=s" => \$list);
>
> open(FILE, $list) or die "can't open file $list -- $!";
>
> while( <FILE> )
> {
> * * * $file = $_;
> * * * chomp($file);
> * * * $file = "\"" . "$file" . "\"";
> * * * print "$file \n";
>
> * * * *print "grep -v \$Header $file > temp.txt \n";
> * * `grep -v \$Header $file > temp.txt `;
>
> * * print "copy temp.txt $file /y \n";
> * * `copy temp.txt $file /y`;
> *}
> close(FILE);- Hide quoted text -
>
> - Show quoted text -[/color]
Insufficient. A 'grep -v' is only a line or two of code. The
difficulty is that the RCS '$Log$' utility, and that for CVS, actually
incorporate the full contents of the RCS or CVS logs into the file
itself, and try to do clever auto-formatting. The reult is that a $Log
$ with a blank prefix creats dozens, or thousands, of lines with a
blank prefix, and then terminates with whatever terminated it before.
If it's prefixed with a '*' as a conveniently formatted .c or .h file
might be, the $Log$ lines are also prefixed, until theyt encounter the
*/ at the end of the comments.
Don't get me going on what happens if someone mentions '$Log$' in the
comments for a $Log$ entry. It's not pretty, and is a compelling
reason to separate the logs from the content of the file itself.
Re: Utility to strip $Log from RCS checked-out files
On 9 Jun, 17:58, Nico Kadel-Garcia <nka...@gmail.com> wrote:[color=blue]
> On 9 Jun, 21:37, fvau...@gmail.com wrote:
>
>
>[color=green]
> > On 6 Jun, 15:37, fvau...@gmail.com wrote:[/color]
>[color=green][color=darkred]
> > > On 27 May, 15:21, Nico Kadel-Garcia <nka...@gmail.com> wrote:[/color][/color]
>[color=green][color=darkred]
> > > > I'm dealing with a massive RCS repository, for various reasons, and
> > > > I'd like a clean little utility to strip the $Log$ entries out to ease
> > > > diffing files against backup files, and to ease integration to a new
> > > > Subversion system (which does not support $Log$[/color][/color]
>[color=green][color=darkred]
> > > > Does anyone have a clean utility for this? I don't want them retained,
> > > > the information is in the RCS logs and will be in the subversion logs,
> > > > I just want them yanked out of text files, C source code, etc.
> > > > Otherwise, I'll have to spend some time writing it in perl, and I
> > > > really don't feel like spending the time.[/color][/color]
>[color=green][color=darkred]
> > > Any luck in finding such a utility? I'm in need of something similar.[/color][/color]
>[color=green][color=darkred]
> > > thanks,
> > > Fred[/color][/color]
>[color=green]
> > I was able to write a simple Perl script that uses "grep -v" to filter
> > out keywords (see inline below). The script was written for Windows,
> > but could be easily adapted for Linux.[/color]
>[color=green]
> > use Getopt::Long;[/color]
>[color=green]
> > GetOptions("list=s" => \$list);[/color]
>[color=green]
> > open(FILE, $list) or die "can't open file $list -- $!";[/color]
>[color=green]
> > while( <FILE> )
> > {
> > $file = $_;
> > chomp($file);
> > $file = "\"" . "$file" . "\"";
> > print "$file \n";[/color]
>[color=green]
> > print "grep -v \$Header $file > temp.txt \n";
> > `grep -v \$Header $file > temp.txt `;[/color]
>[color=green]
> > print "copy temp.txt $file /y \n";
> > `copy temp.txt $file /y`;
> > }
> > close(FILE);- Hide quoted text -[/color]
>[color=green]
> > - Show quoted text -[/color]
>
> Insufficient. A 'grep -v' is only a line or two of code. The
> difficulty is that the RCS '$Log$' utility, and that for CVS, actually
> incorporate the full contents of the RCS or CVS logs into the file
> itself, and try to do clever auto-formatting. The reult is that a $Log
> $ with a blank prefix creats dozens, or thousands, of lines with a
> blank prefix, and then terminates with whatever terminated it before.
> If it's prefixed with a '*' as a conveniently formatted .c or .h file
> might be, the $Log$ lines are also prefixed, until theyt encounter the
> */ at the end of the comments.
>
> Don't get me going on what happens if someone mentions '$Log$' in the
> comments for a $Log$ entry. It's not pretty, and is a compelling
> reason to separate the logs from the content of the file itself.[/color]
I agree. The $Log are a pain. I was lucky in that I didn't have to
deal with them, but I can see they would be painful to parse out.
regards,
Fred