"fixing" RCS files

Dominic Mitchell dom at happygiraffe.net
Fri Feb 3 13:17:46 GMT 2006

On Thu, Feb 02, 2006 at 11:44:13PM +0000, Tara Andrews wrote:
> > For a particular comment style in a group of perl files I have something
> > like this would work but obviously it needs to be adjusted for your
> > files:
> This is a bit closer to what I was after; thanks.
> Actually the info on how to tell rcs not to do keyword expansion on
> checkin is entirely irrelevant to what I want.  I don't want to check
> in a new rev of the file.  I want to snip all the $Log:$ info out of
> the file,v and pretend it was never there.  And I don't want to
> otherwise alter the state of the repository.
> This CVS repository is full of files with log keyword expansion, and
> most of them don't belong to me.  I just help maintain the repository
> and want to clean the crap out prior to a cvs -> svn migration, and
> prior to a few nasty merges that loom in the future for some hapless
> developers.

The problem with $Log$ (and one of the reasons that it's discouraged
these days) is that there is no clear end to what it's inserted into the
file.  I think that the only guarantee is that you'll have the same
comment character on all following lines.  Which isn't much help if
you've got comments immediately after $Log$ anyway.

To be honest, I'd say that you're probably better off simply running the
svn conversion as-is, then doing one big cleanup on all the files.
Commit it all in one go and then stop worrying about it.  Disk is cheap.

> I suppose the only thing that might actually work in an automated
> fashion is to generate a bunch of diffs for each file, from rev 1.1
> through each revision to HEAD, perform surgery on the diffs, and
> re-apply them.  I had thought, though, that since I can see how to do
> the RCS surgery manually, and since it seems like this would have been
> a problem others had run into, there might already be an existing
> solution.

This is exactly how the SCCS to RCS conversion script works.  :-)


More information about the london.pm mailing list