[PHP-DEV] cvs: /CVSROOT loginfo.pl From: Andrei Zmievski (andrei <email protected>)
Date: 05/12/00

andrei Fri May 12 15:52:59 2000 EDT

  Modified files:
    /CVSROOT loginfo.pl
  Log:
  Improve the format a bit.
  
  
Index: CVSROOT/loginfo.pl
diff -u CVSROOT/loginfo.pl:1.27 CVSROOT/loginfo.pl:1.28
--- CVSROOT/loginfo.pl:1.27 Fri May 12 14:44:52 2000
+++ CVSROOT/loginfo.pl Fri May 12 15:52:59 2000
@@ -139,31 +139,27 @@
 
 # build our email
 my $msg = "";
-my $subj = "";
-my $list = "";
-
 if($#added_files ne -1) {
- $list = &build_list( <email protected>);
         $msg .= "\n Added files:";
- $msg .= $list;
- $subj .= $list;
+ $msg .= &build_list( <email protected>);
 }
 if($#removed_files ne -1) {
- $list = &build_list( <email protected>);
         $msg .= "\n Removed files:";
- $msg .= $list;
- $subj .= $list;
+ $msg .= &build_list( <email protected>);
 }
 if($#modified_files ne -1) {
- $list = &build_list( <email protected>);
         $msg .= "\n Modified files:";
- $msg .= $list;
- $subj .= $list;
+ $msg .= &build_list( <email protected>);
 }
 
-# replace all whitespace with real spaces, and collapse consecutive spaces
-$subj =~ s/\s+/ /g;
+my $subj = "";
+my %dirfiles;
+my  <email protected> = &get_dirs( <email protected>,  <email protected>,  <email protected>);
 
+foreach my $dir ( <email protected>) {
+ $subj .= "$dir @{ $dirfiles{$dir} } ";
+}
+
 my $msgid = "Message-ID: <cvs$cvsuser".time()."\ <email protected>>\n";
 
 my %handles;
@@ -203,7 +199,7 @@
 "To: $mailto\n".
 $msgid.
 $rfc822date.
-"Subject: cvs: $subj\n".
+"Subject: cvs: $module$tag $subj\n".
 "\n".
 "$cvsuser\t\t".localtime()." EDT\n".
 "$msg".
@@ -279,14 +275,14 @@
 
 sub get_dirs {
   my  <email protected> = sort  <email protected>;
- my %dirs;
   foreach my $file ( <email protected>) {
     (my $dir = $file) =~ s#[^/]+$##;
     $dir =~ s/^$module//;
- $dirs{$dir} = 1;
- }
- return sort keys %dirs;
-}
+ $file =~ s#^.+/(.+)$#\1#;
+ push @{ $dirfiles{$dir} }, $file;
+ }
+ return sort keys %dirfiles;
+}
 
 sub indent {
   my ($msg,$nr) =  <email protected>;

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>