ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/misc/scripts/shell/cvslog.sh
Revision: 1.10
Committed: Sat Sep 27 17:21:31 2003 UTC (21 years, 2 months ago) by tdb
Content type: application/x-sh
Branch: MAIN
Changes since 1.9: +1 -1 lines
Log Message:
Update scripts that use cvs2cl. Now using cvs2cl 2.49, still with some
custom patches (but less than before). Diff included here.

--- cvs2cl.bak	Sat Sep 27 16:57:59 2003
+++ cvs2cl	Sat Sep 27 17:10:55 2003
@@ -1036,7 +1036,8 @@
           elsif ($No_Wrap && !$Summary)
           {
             $msg = &preprocess_msg_text ($msg);
-            $files = wrap ("\t", "\t", "* $files");
+# tdb: no-wrap shouldn't wrap ANYTHING!
+            #$files = wrap ("\t", "\t", "* $files");
             $msg =~ s/\n(.+)/\n\t$1/g;
             unless ($After_Header eq " ") {
               $msg =~ s/^(.+)/\t$1/g;
@@ -1328,7 +1329,8 @@
   # there are multiple qunks in the first place!
   if ((scalar (@qunkrefs)) > 1) {
     foreach my $tag (keys (%non_unanimous_tags)) {
-      my $everyone_has_this_tag = 1;
+# tdb: we don't want to have unanimous tags
+      my $everyone_has_this_tag = 0;
       foreach my $qunkref (@qunkrefs) {
         if ((! (defined ($$qunkref{'tags'})))
             or (! (grep ($_ eq $tag, @{$$qunkref{'tags'}})))) {
@@ -1521,7 +1523,8 @@

     unless ( exists $fileinfo_printed{$b} ) {
       if ($fbegun) {
-        $beauty .= ", ";
+# tdb: hacked to put a newline after each one
+        $beauty .= ",\n";
       } else {
         $fbegun = 1;
       }

File Contents

# User Rev Content
1 tdb 1.1 #!/bin/sh
2    
3     #---------------------------------------------------------
4     # cvslog.sh
5     #
6     # Script to send daily cvslog e-mails.
7     # Written by Tim Bishop [tdb1@ukc.ac.uk] 26/01/2001
8     #
9     # Copyright i-Scream, 2000
10     # http://www.i-scream.org.uk
11     #---------------------------------------------------------
12    
13     ## settings
14    
15 tdb 1.2 # e-mail addresses
16 tdb 1.3 TOADDR="commits@i-scream.org.uk"
17 tdb 1.4 FROMADDR="commits@i-scream.org.uk"
18 tdb 1.1
19     # cvs path
20 tdb 1.2 CVS="/usr/bin/cvs"
21 tdb 1.1
22     # cvs repository
23 tdb 1.2 CVSROOT="/cvs/i-scream"
24 tdb 1.1
25     # temporary checkout directory (checked out modules already)
26 tdb 1.2 CHECKOUTDIR="/home/sites/www.i-scream.org.uk/cvsscripttemp"
27 tdb 1.1
28     # path to cvs2cl
29 tdb 1.5 CVS2CLPATH="/home/sites/www.i-scream.org.uk/bin/cvs2cl2.pl"
30 tdb 1.1
31     # command line args for cvs2cl
32 tdb 1.7 #CVS2CLARGS="-w -r -b -t -U ${CVSROOT}/CVSROOT/users -l \"-dyesterday<today\" -g \"-d${CVSROOT}\" -g \"-Q\""
33 tdb 1.10 CVS2CLARGS="--no-wrap --no-common-dir -w -r -t -S -U ${CVSROOT}/CVSROOT/users -l \"-dyesterday<today\" -g \"-d${CVSROOT}\" -g \"-Q\""
34 tdb 1.1
35     # cvs2cl command
36     CVS2CL="${CVS2CLPATH} ${CVS2CLARGS}"
37    
38     # subject line
39     SUBJECT="i-scream daily commit logs - "
40    
41 tdb 1.2 # full cvs update script
42     FULLCVSUPDATE="/home/sites/www.i-scream.org.uk/bin/fullcvsupdate.sh"
43    
44 tdb 1.3 # path to sendmail
45     SENDMAIL="/usr/sbin/sendmail"
46    
47 tdb 1.5 # cvslog webpage for this day :)
48     DATE=`/bin/date --date="1 day ago" "+%Y/%m/%d"`
49 tdb 1.6 CVSLOGURL="http://www.i-scream.org.uk/cgi-bin/cvslog.cgi?period=date&date=${DATE}&module="
50     CVSLOGLINE="This log is viewable online at ${CVSLOGURL}"
51 tdb 1.1
52     ## code
53    
54 tdb 1.8 ${FULLCVSUPDATE} >/dev/null 2>&1
55 tdb 1.2
56     MODULES=`ls ${CVSROOT}`
57    
58 tdb 1.1 cd ${CHECKOUTDIR}
59    
60 tdb 1.2 for MODULE in ${MODULES}; do
61 tdb 1.1
62 tdb 1.2 ${CVS2CL} ${MODULE}
63 tdb 1.1 if test -r "ChangeLog"; then \
64 tdb 1.2 ( echo "To: ${TOADDR}"; echo "From: ${FROMADDR}"; \
65 tdb 1.6 echo "Subject: ${SUBJECT}${MODULE}"; echo ${CVSLOGLINE}${MODULE}; \
66     echo; echo; cat ChangeLog; \
67 tdb 1.3 echo "." ) | ${SENDMAIL} ${TOADDR}; \
68 tdb 1.1 rm -f ChangeLog
69     fi;
70    
71     done