Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Mar 2002 13:14:34 -0500
From:      "Dan Langille" <dan@langille.org>
To:        Roman Neuhauser <neuhauser@mobil.cz>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: XML interface to CVS
Message-ID:  <20020326181435.D3BA23F28@bast.unixathome.org>
In-Reply-To: <20020326181528.GS389@roman.mobil.cz>
References:  <20020326152301.38D7A3F28@bast.unixathome.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 26 Mar 2002 at 19:15, Roman Neuhauser wrote:

>     How is the recursion used? I guess I wouldn't have to ask this
>     question if I knew what FP does for the ports tree. :) (Not that I
>     don't have a rough idea, but I don't know the internals.)

In the definitions of the tree.  I have one table which contains 
everything within the source tree.  A given row will refer to another row 
within the table as the parent.  Items in the root directory have no 
parent.

> > The FP2 database was populated by migrating data from FP1.  However,
> > the ideal population method would be directly from CVS, hence the
> > query about an XML interface to CVS.  It would also allow FP2 to query
> > any CVS repository and populate itself.
> 
>     Do you want to store old revisions in the FreshPorts database?

Revisions were introduced with FP2.

>     Example: 
>     OpenBSD ports collection FP-site is started. Does it make any sense
>     to load the complete history of the tree when FP is a "remind me"
>     service?
>     Looks to me like it's not that useful...
>     I mean, it's quite nice to keep older revisions for some time, but I
>     don't really grok the need to load the complete history of a CVS
>     tree upon its registration.
> 
>     Explanation?

The FP2 database is initially populated from HEAD (there is only one ports 
tree, HEAD).  

> > This feature would probably have a bigger effect on FreshSource than
> > FreshPorts, but the capability would useful for both.
> 
>     Again: do you want to store old revisions? 

Especially so for FreshSource.  The database does not store the actual 
file contents, merely the fact that revision X of file Y exists.  This was 
a capability added with FP2.

>  
> > [4] - http://www.FreshSource.org/
> 
>     What's the $CVSROOT? :)

I fear my brain is fried from a 5am start today...

>     Other than that, given that this is a push service (the CVS server
>     pushes the info to the FP/FS server, and that pushes it to the
>     subscribers), 

Normally yes.  For initial data loading, FP/FS will pull the data out of 
CVS.

> what would be more useful is a script that you could
>     register in commit hook, and it'd pass the XML over to a FP/FS
>     "listener". HTTP POST, RPC, whatever...

I've spoken with Josef about that possibility (adding an XML hook into the 
commit process) and we could do that.  But realistically, other projects 
could be included without having to change their commit processes.  I can 
imagine there being resistance in some projects to doing such things just 
so their project can be included.  Keeping the XML creation out of the 
project makes it easier in that regard.

>     Of course, the FP/FS service can just query the CVS server in
>     scheduled intervals, or parse emails...

FP/FS processes emails now.  It works well and is simple.  In simplistics 
terms, any other project just needs to convert their particular cvs-all 
email to XML and they can use FP/FS.

>     XML is indeed useful in this situation, because it allows for for
>     quite a variety of revision-control systems: one could write an app
>     to get the info out of a Perforce repo, or a SVN one...

I hadn't thought of that.  I was just looking for an easy way for CVS.

BTW: I've been directed to this perl interface to CVS, which does provide 
a working base for an API:

    http://people.freebsd.org/~eivind/CVSFile-0.2.tar.gz

-- 
Dan Langille
The FreeBSD Diary - http://freebsddiary.org/ - practical examples


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020326181435.D3BA23F28>