Re: Trimming old diffs to save space

[email protected] (Larry Jones)
Newsgroups gmane.comp.gnu.rcs,gmane.comp.version-control.cvs.bugs,gmane.comp.version-control.rcs.bugs
Message-ID <[email protected]>
Ed Avis writes:
> 
> I am writing a tool to strip out old revisions from an RCS file while
> leaving the log messages.  This is purely to save disk space.

I'd suggest simply revising the log message of the first revision you're
leaving intact to include the previous revisions' log messages and then
outdating the previous revisions.  (Use the -m and -o options to cvs
admin or rcs.)

> As far as I know there is no standard
> description of the RCS file format, only the implementations of tools
> that use it.

RCS includes an ``rcsfile'' man page that describes the format.  For
example:

	<http://www.daemon-systems.org/man/rcsfile.5.html>

> My first try was to make the diff empty, as
> 
> text
> @
> @

That's not an empty diff, that's a diff containing a single newline
(which isn't valid).  An empty diff (which is valid) would be:

	text
	@@

-Larry Jones

It works on the same principle as electroshock therapy. -- Calvin
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.