On Tue, May 23, 2006 at 12:08:07PM -0400, Armando L. Caro, Jr. wrote:
> Sylvain Beucler wrote:
>
> > I'm currently using this script:
> > http://arch.savannah.gnu.org/head/administration/infra/main/0/cvs/generate_log_accum.pl
> > to configure all CVS commits notifications site-wide.
> >
> > However, I need to work on it to support the new version of log_accum
> > (Derek R. Price and I merged Savannah version with the one in CVS'
> > contrib), and more importantly I'd like to integrate it in the Savane
> > web interface.
> >
> > Since you plan to develop a script, would be be interested in helping?
>
> Well, I could help somewhat. I'm working on back end support, but I
> don't think I want to spend time on front end support (ie, web
> interface). If someone else wants to work on that, that would be helpful
> and useful. When I'm done, I'll contribute what I have.
Ok, I could deal with the web interface.
Here're my suggestions about the backend:
- the code could go in sv_groups, because it already cycles through
all projects with CVS activated. Instead of calling
Cvs::CvsMakeArea, it would call Cvs::UpdateLogAccum or something
like that. The other option would be to create a separate cron job
script, but that sounds like rewriting lots of existing code.
- you can base your code on mine above, unless you already have one
working. I planned a few improvements on it:
1) support the new version of log_accum at
http://cvs.sv.gnu.org/viewcvs/ccvs/contrib/?root=cvs which should
be working now (I'm about to switch to it, since the merge with
savannah's version is finished). It's just about using slightly
different command-line options.
2) in order to support project-specific CVSROOT/loginfo lines, I
think the script should only replace a section between #<savane>
and #</savane> (like sv_aliases) instead of overwriting the whole
loginfo/commitinfo. I have some projects that need special
actions, not managed through Savane, and it's a pain when those
are overwritten by my cron script :)
3) there's a couple input validation to implement (documented with
"TODO"), eg. so that users cannot use a weird module regexp to
trick the system into executing arbitrary commands.
- we need a new database to store the log_accum parameters. I think it
should match what I'm using in the log_sources.txt / log_web.txt
that I'm using, which means the database should be pretty simple. We
need to attach a log_accum configuration to a _type_ of cvs
repository, though, because you can can create a lot of different
cvs repositories with Savane (scm-cvs, web, download, etc.). One
additional field should be enough to deal with this, but I haven't
checked.
- think of a generic way to do this, allowing to easily add support
for other scripts later on (CIA, other notification mailers such as
cvsreport which is used by Gna!, webpages sync-on-commit, cvs_acls,
etc).
Maybe Mathieu has some suggestions as well on the best way to add this
new backend action.
Feel free to discuss it :)
> I'll ping you if I have trouble using/configuring log_accum.
Ok. Just use the HEAD version :)
As for the frontend, I think that:
- loginfo/commitinfo update will be activated unconditionnaly if cvs
is activated
- the user will not be able to enter a full regexp, but only either of:
* a list of directories
* DEFAULT
* ALL
- the user will be given a set of options to define, including diff
options, mail to send notification to, mail to send diffs to,
activate diffs or not, etc.
- you tell me if you think of something :)
--
Sylvain
_______________________________________________
Savane-dev mailing list
[email protected]
https://mail.gna.org/listinfo/savane-dev