Utility to strip $Log from RCS checked-out files - Setup

This is a discussion on Utility to strip $Log from RCS checked-out files - Setup ; 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 ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: Utility to strip $Log from RCS checked-out files

  1. 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.

  2. Re: Utility to strip $Log from RCS checked-out files

    On 27 May, 15:21, Nico Kadel-Garcia wrote:
    > 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.


    Any luck in finding such a utility? I'm in need of something similar.

    thanks,
    Fred

  3. Re: Utility to strip $Log from RCS checked-out files

    On 6 Jun, 15:37, fvau...@gmail.com wrote:
    > On 27 May, 15:21, Nico Kadel-Garcia wrote:
    >
    > > 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.

    >
    > Any luck in finding such a utility? I'm in need of something similar.
    >
    > thanks,
    > Fred


    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 = $_;
    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);


  4. Re: Utility to strip $Log from RCS checked-out files

    On 9 Jun, 21:37, fvau...@gmail.com wrote:
    > On 6 Jun, 15:37, fvau...@gmail.com wrote:
    >
    >
    >
    >
    >
    > > On 27 May, 15:21, Nico Kadel-Garcia wrote:

    >
    > > > 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.

    >
    > > Any luck in finding such a utility? I'm in need of something similar.

    >
    > > thanks,
    > > Fred

    >
    > 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 = $_;
    > * * * 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 -


    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.

  5. Re: Utility to strip $Log from RCS checked-out files

    On 9 Jun, 17:58, Nico Kadel-Garcia wrote:
    > On 9 Jun, 21:37, fvau...@gmail.com wrote:
    >
    >
    >
    > > On 6 Jun, 15:37, fvau...@gmail.com wrote:

    >
    > > > On 27 May, 15:21, Nico Kadel-Garcia wrote:

    >
    > > > > 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.

    >
    > > > Any luck in finding such a utility? I'm in need of something similar.

    >
    > > > thanks,
    > > > Fred

    >
    > > 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 = $_;
    > > 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 -

    >
    > 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.


    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

+ Reply to Thread