Wygląd commitlogów

Bartosz Taudul wolf42 w wp.pl
Pią, 30 Sty 2004, 19:31:39 CET


W załączniku patch przywracający mniej więcej stary wygląd logów.
Uprasza się o jak najszybsze nałożenie.

wolf
-- 
  Bartek   .  - Umówiłem się z panem, że będę jutro odpowiadał.
  Taudul   :  - A to w jakim pubie się umówiliśmy?
          .:....................................................................
w o l f @ p l d - l i n u x . o r g            .:. http://chimera.one.pl/~wolf/
-------------- następna część ---------
--- aa	2004-01-27 17:08:58.000000000 +0100
+++ cvslog.pl	2004-01-30 19:20:34.000000000 +0100
@@ -26,13 +26,14 @@
 # TODO: attach diffs (under some length, possibly a diffstat instead),
 #	non-agressively reformat log messages
 #
-# $Id: cvslog.pl,v 1.47 2004/01/27 16:08:58 qboosh Exp $
+# $Id: cvslog.pl,v 1.8 2004/01/30 18:20:34 wolf Exp $
 
 use strict;
 use vars qw ($project $repository $from_email $dest_email $reply_email
-		$CVS $diffstat $cvsweb_url $help_msg $sync_delay $max_diff_lines
+		$CVS $diffstat $cvsweb_url $sync_delay $max_diff_lines
 		$show_diffstat $show_diff $login $subj_files $subj_maxlength
-		$withthreading_email $messageid_email $mail_contenttype $mail_contenttransen);
+		$withthreading_email $messageid_email $mail_contenttype
+		$mail_contenttransen $withsubjectlog);
 
 
 
@@ -40,6 +41,9 @@
 
 # with threading?
 $withthreading_email = 1;
+
+# with log in subject?
+$withsubjectlog = 0;
 
 # mail content-type
 $mail_contenttype="text/plain; charset=iso-8859-2";
@@ -87,10 +92,7 @@
 $diffstat = '/usr/bin/diffstat -p0 -w 72';
 
 # URL of cvsweb. Just comment out if you don't have any.
-$cvsweb_url = 'http://cvs.pld-linux.org/cgi-bin/cvsweb';
-
-# The leading message of the mail:
-$help_msg = "This is an automated notification of a change to the $project CVS tree.";
+#$cvsweb_url = 'http://cvs.pld-linux.org/cgi-bin/cvsweb';
 
 # Number of seconds to wait for possible concurrent instances. CVS calls up
 # this script for each involved directory separately and this is the sync
@@ -181,7 +183,7 @@
   }
 }
 
-$htag = $tag ? $tag : "<TRUNK>";
+$htag = $tag ? $tag : "HEAD";
 
 while (<STDIN>) {
   $logmsg .= $_;
@@ -307,7 +309,7 @@
   $subdir =~ s!^[^/]*/?!!;
   $subdir .= '/' if $subdir ne '';
 
-  $files_affected_part .= "\n$dir:\n   ";
+  $files_affected_part .= "\n   $dir:\n\t";
 
   if ($dirs[$i]->{type} eq 'directory') {
     $files_affected_part .= "New directory\n";
@@ -343,25 +345,25 @@
 
 my ($subj);
 $subj_file_list =~ s/, $/ /;
-$subj = "Subject: $module".($tag?" ($tag)":"").": ".($subj_files?$subj_file_list:"").$logmsg;
+if($withsubjectlog)
+{
+  $subj = "Subject: $module".($tag?" ($tag)":"").": ".($subj_files?$subj_file_list:"").$logmsg;
+}else{
+  $subj = "Subject: $module".($tag?" ($tag)":"").": ".($subj_files?$subj_file_list:"");
+}  
 $subj =~ s/\n/ /g; $subj =~ s/ *$//;
 $subj = substr($subj, 0, $subj_maxlength-3) . '...' if (length($subj) > $subj_maxlength);
-my $keywords="DEV-$user, MOD-$module, TAG-".($tag?$tag:"TRUNK").", ". $subj_file_list;
 
 print MAIL <<EOM;
 From: $from_email
 To: $dest_email
 Reply-To: $reply_email
-Mail-Followup-To: $reply_email
-X-CVS: $user\@$project:$module
 X-CVS-Module: $module
-User-Agent: cvslog.pl/$VERSION
 $subj
 Message-ID: $messageid
 MIME-Version: 1.0
 Content-Transfer-Encoding: $mail_contenttransen
 Content-Type: $mail_contenttype
-Keywords: $keywords
 EOM
 
 if ($withthreading_email) {
@@ -371,7 +373,7 @@
 EOM
 }
 
-my $msgheader = sprintf ("%-36s %s\n%-36s %s", "Author: $user", "Date: $date GMT","Module: $module"," Tag: $htag");
+my $msgheader = sprintf ("%s\t%s\n%s\t%s", "Module name:\t$module", $tag ? "(BRANCH: $htag)" : "","Changes by:\t$user","$date GMT");
 $logmsg =~ s/\n+/\n/gm;
 #$logmsg =~ s/\n$//m;
 #$files_affected_part=~ s/\n$//m;
@@ -379,25 +381,22 @@
 print MAIL <<EOM;
 
 $msgheader
+
 EOM
 
 print MAIL <<EOM;
----- Log message:
-$logmsg
+Modified files:$files_affected_part
+
 EOM
 
 print MAIL <<EOM;
----- Files affected:$files_affected_part
+Log message:
+$logmsg
 EOM
 
 
 goto end_diff unless $show_diff or $show_diffstat;
 
-print MAIL <<EOM;
-
----- Diffs:
-EOM
-
 # And now the diffs!
 
 my @diff;
-------------- następna część ---------
Załącznik, który nie był tekstem został usunięty...
Name: nie znany
Type: application/pgp-signature
Size: 189 bytes
Desc: nie znany
Url : /mailman/pipermail/pld-devel-pl/attachments/20040626/97e79ac7/attachment.bin


Więcej informacji o liście dyskusyjnej pld-devel-pl