Forum OpenACS Q&A: ANN: OpenACS CVS Commits now on forums

Hi all,

I started on a path to make OpenACS CVS Commit messages be on their own forum about a week or so ago (we discussed a mailing list, but abiding by the eat your own dog food principle, a forums solution would be better, plus it's just plain cool).

After some wasted time trying to figure out how the qmail queue worked (which I eventually figured out), and noticing that this wouldn't be the best way to go, I started working on a Tcl script to insert the CVS commit messages straight into forums.

I first ported the log.pl script that comes with Perl to Tcl, so that I could maintain the same output, and once successful I "forum-lized" the script with the excellent nstcl (BTW, Michael, there's a bug in nstcl's db_string documentation. Typo in the syntax)

So right now you can go to the "CVS Commits" forum on dev.openacs.org (http://dev.openacs.org/forums/forum-view?forum_id=46408) and sign up for notifications. You'll then receive the CVS commit logs at your convenience in your inbox. One thread is created per day, with commits following the first commit of the day being posted as replies.

I think there's something wrong with the AOLserver setup for sending mail out of dev.openacs.org right now, but I'm sure Dave will look into it later today. It's 3:48 AM and I won't do it now 😊 But as soon as that's fixed, you'll get the notifications.

Enjoy.

P.S.: While I was writing this I noticed that Lars made a commit 😊 http://dev.openacs.org/forums/message-view?message_id=46418

Collapse
Posted by Jeff Davis on
It would be nice if the messages were categorized by package, although with a thread per day I guess that will not work since even though bboard
asks for a category on replies, it does not display replies by
their categories. I might opt for a thread per package per day or something like that.  Then again since you can get at everything via cvs log anyway maybe it does not matter.

Some markup would probably be a big help since the log messages are pretty verbose and hard to parse as essentially plain text.  Highlighting the filename, submitter, and log message would make sense I think.

Collapse
Posted by Don Baccus on
Let's congratulate the boy before we nitpick him to death!

Good job, Roberto!  This is cool.

How hard would it be to put the commits for OpenACS 4 in a forum mounted under the openacs-4 project rather than in a general forum?

I think categorization would be good ... then one could visit the forum directly to see all openacs-4 commits yet the bug tracker could offer package-specific links that just show those for a particular package.

Better formatting would be good, as Jeff mentions.

I think where we end up with this is that we'll probably have a custom display page to display these.

Hmmm ... when the forums idea came up it was partly because of our thinking that qmail insertion would be straightforward and easy.  Since you're doing it in Tcl general comments might be a better base, long term, for integration with the bugtracker.

However ... this is a fantastic hack no matter what long-term solution we invent. I love it!

Collapse
Posted by Roberto Mello on
Jeff,

Yes, some markup would be good, but that's easy to add and I figured I could do it after I got some sleep 😊 If you have some suggestions for the markup, I'll add it right now.

Commits per packages seem good, but since Forums has no categorization, we'd have to either have a different forum for each package (way too much) or a different thread for each package (more feasible). I just ran out of time list night, but it's really simple to do the latter with  the way CVS handles these log infos and the way I wrote the script.

Don, thanks 😊

We can put the commits for any of the CVS modules we have in CVS (e.g. openacs-4, ns_xmlrpc) in any forum, and even in different forums depending on the module (cool eh?).

The problem with the qmail thing would be that I'd have to make a slightly different load_qmail_queue function than the one that is in the notifications package.

That function would scan the incoming queue of a certain user and insert the mail coming through. This would have the advantage that I could have used the perl script as it was. The problem is that I'd have to figure out a way to stop people from sending mail to that account and getting that mail automatically inserted into the forum.

In any way I'd have to partly rewrite the script, so rewriting the script and hooking straight into the database would give us much more flexibility.

As per your general comments idea, I hadn't thought of that. Were you thinking of adding commit messages per module as comments on the bug tracker? What about notifications?

Collapse
Posted by Roberto Mello on
Another idea that could easily come as a result of our DB integration would be CVS commit ranks, a la SourceForge 😊
Collapse
Posted by Don Baccus on
As per your general comments idea, I hadn't thought of that. Were you thinking of adding commit messages per module as comments on the bug tracker? What about notifications?
Oh, yeah, notifications is something else that comes for free with forums. OK, maybe just some custom skinning on forums then :) Also I see "make new post" type links ... I'm a sitewide admin so maybe regular users don't see these but if you do some skinning of this you could just leave the links out. We should be thinking about moving this all this stuff to a portal/portlet based thing down the line (in other words the project subsites). But of course we don't want to slow down roll-out so we'll leave that idea for the future.
Collapse
Posted by Roberto Mello on
Yeah, I left the CVS commit forum open for posting for the time being, to ease the script work. I don't know yet how to make one forum closed for posting from everybody, except one user.

I thought about moderation, but I don't want to approve the posts manually.

Collapse
Posted by Michael A. Cleverly on
Roberto: thanks for noticing the typo in the documentation for db_string... the test suite for nstcl covers the code itself fairly thoroughly, but it doesn't really help for mistakes in the docs.  😉
Collapse
Posted by Jeff Davis on
Here is what I think I would like to see on the subject:
strip the leading openacs-4/packages, leave out "commit by" and add number of files committed. Which would make http://dev.openacs.org/forums/user-history?user_id=46412 much easier to parse.

Here is the code for that...

regsub openacs-4/packages/ $modulepath {} subject
append subject "([llength $files] files) $author"

I am inclined to leave off the per file status since I think it adds a lot of useless verbiage. I don't know what other people think on this one.

So after highlighting what we want to scan for this page http://dev.openacs.org/forums/message-view?message_id=46446
would look more like:

bug-tracker/www (2 files) lars OpenACS CVS System Aug 29 2002 11:15:12

Author:	lars
Update of /cvsroot/openacs-4/packages/bug-tracker/www

Modified Files:
	bug-add.tcl index.tcl 
Log Message:
Added url-name to components, plus a URL shortcut, and email-subject-name to projects

And, yes, it is cool :) I did not mean to nitpick anyone to death. It's also great to have a good example of nstcl in the code base. Maybe we should put the script in the tree as part of openacs-4 as an example so people can easily do such things on their own projects.

Collapse
Posted by Roberto Mello on
Well, I can't regsub for "openacs-4" because we have other project root trees on the OpenACS CVS project. What I could do is have one call in the loginfo CVS file (the one that calls my script) for each project and pass a "-r foobar" (for what to regsub) to it.

As for the formatting and subject changes, I added them. Check out http://dev.openacs.org/forums/message-view?message_id=46496