Hiya, a while ago I made the following patch to the contributed log_accum
script in the CVS package, it simply (and in a rather hacked
together/non-configurable way) adds a counter/id number to each commit,
this was mainly for vanity/tracking usage to see how often we were
actually using CVS.
I was wondering if this patch would like to be tidied up by something more
knowlegable with perl and stuff to make it configurable from the
commandline (i.e --usecounter) (of course, the counter should be updated
nontheless, just not printed on the emails).
Also, on line 321 I changed the printed module name to include the first
two levels of the module (we seperate our projects out like app/proj1
app/proj2), I'm sure how to do it, but making this level configurable
could be cool (i.e. --displaymodulelevel 2).
Anyway, I thought I'd be nice and share this patch with you all :P
Mark
[root@cvs contrib]# diff log_accum.orig log_accum
226a227,238
> # Add commit counter - MD 20.05.2000
>
> $counterfile = "/tmp/cvs.counter";
> $cvscounter = 0;
> open(counterfile, "$counterfile");
> $cvscounter = <counterfile>;
> close(counterfile);
> $cvscounter++;
> open(counterfile, ">$counterfile");
> print counterfile "$cvscounter\n";
> close(counterfile);
>
229c241
< print MAIL "Subject: CVS Update: " . $modulename . "\n";
---
> print MAIL "Subject: CVS Update (#" . $cvscounter
. "): " . $modulename . "\n";
321c333
< $modulename = $path[0]; # I.e. the module name == top-level dir
---
> $modulename = $path[0] . "/" . $path[1];
494a507,512
> @lines = &read_logfile("$LOG_FILE.$i.$id", "\t");
> if ($#lines >= 0) {
> push(@text, "Log message:");
> push(@text, @lines);
> push(@text, "");
> }
513,518c531
< @lines = &read_logfile("$LOG_FILE.$i.$id", "\t");
< if ($#lines >= 0) {
< push(@text, "Log message:");
< push(@text, @lines);
< push(@text, "");
< }
---
> # Log Message was here.
[root@cvs contrib]#
--
"We don't guarantee anything except that it will take up disk space..."
Apache 2.0alpha5 Disclaimer
Now Playing: Steve Stevens - Desperate Heart