Jason Pyeron <[EMAIL PROTECTED]> wrote on 08/16/2005 04:17:15 PM:

> On Tue, 16 Aug 2005 [EMAIL PROTECTED] wrote:
> 
> > After following your link, I am sure that some RCS systems that use 
MySQL
> > as a backend *may* use UDFs as part of their persistence logic, but 
those
> > would be specific to the RCS product you are curious about. There 
aren't
> > any "generic" UDFs that will apply to all verson contol front-ends. 
Does
> > the one in the link use any UDFs? I couldn't tell from what I read and 
to
> > be perfectly honest, I couldn't figure out from the reading that RCS
> > actually used MySQL at all.
> >
> > Is this what you wanted to know or have I still missed something vital 
to
> > the question? It's been one of those days for me.
> >
> > Jason Pyeron <[EMAIL PROTECTED]> wrote on 08/16/2005 02:15:34 PM:
> >
> >> http://www.cs.purdue.edu/homes/trinkle/RCS/
> 
> RCS does not use MySQL or any other SQL engine.
> 
> I am looking to use a SQL backend for RCS.
> 
> RCS is a specific tool unlike source control management (SCM), it is a 
> text file database. There are no SQL based RCS implimentations that I 
know 
> of, that was why I asked in the first place.
> 
> 
> 
> A RCS file is comprised of:
> 
>   meta data bout the state of the file
>   current source
>   0..N reverse deltas from current source
>   meta data about the various revisions represented,
>    including who, when, why.
> 
> ex:
> 
> head    1.2;
> access;
> symbols;
> locks; strict;
> comment @# @;
> 
> 
> 1.2
> date    2005.07.31.20.05.02;    author jpyeron; state Exp;
> branches;
> next    1.1;
> 
> 1.1
> date    2005.07.07.05.20.31;    author jpyeron; state Exp;
> branches;
> next    ;
> 
> desc
> @@
> 
> 
> 1.2
> log
> @my comment about this
> version is a BLOB TEXT
> delimited by the (at)s
> @
> text
> @Here it the contents of my file
> it is many lines long
> line 3
> line 4
> line 5
> line 6
> line 7
> line 8
> line 9 then terminated by the (at)
> @
> 
> 
> 1.1
> log
> @Initial version
> @
> text
> @d9 1
> a9 1
> line 9 original version
> @
> 
> 

Now... don't be so hasty. MS SQL has a form of RCS you can use to check in 
and check out stored procedures and other design elements using Visual 
Source Safe (VSS). VSS acutally uses extended stored procedures (the 
mutant cousins of UDFs) to perform the locking and unlocking of various 
database elements. I think this might count as one version of a 
database-based RCS (even though I think the deltas are stored elsewhere as 
text).

The metadata headers you describe should be easily convertable to database 
fields and the actual delta data could either be stored in a blob (one 
blob per set of changes) or separately listed in their own table (one set 
of delta rows per set of changes). 

Doing an RCS with a database is not complex to design but implementaion 
may be slower than you like just due to the overhead of running a SQL 
query (or mulitple queries) vs. the speed of directly parsing local text 
files. 

A future optimization may be for you to use the HANDLER interface with 
MyISAM tables in order to quickly retrieve your "delta blobs". Just 
something to think about.

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine

Reply via email to