[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Cvs-cvs] ccvs/contrib ChangeLog log_accum.pl
From: |
Derek Robert Price |
Subject: |
[Cvs-cvs] ccvs/contrib ChangeLog log_accum.pl |
Date: |
Mon, 22 May 2006 15:08:25 +0000 |
CVSROOT: /cvsroot/cvs
Module name: ccvs
Branch:
Changes by: Derek Robert Price <address@hidden> 06/05/22 15:08:25
Modified files:
contrib : ChangeLog log_accum.pl
Log message:
* log_accum.pl (mail_separate_diffs): Include the last diff.
(Original patch from Sylvain Beucler <address@hidden>.)
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/contrib/ChangeLog.diff?tr1=1.197&tr2=1.198&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/contrib/log_accum.pl.diff?tr1=1.33&tr2=1.34&r1=text&r2=text
Patches:
Index: ccvs/contrib/ChangeLog
diff -u ccvs/contrib/ChangeLog:1.197 ccvs/contrib/ChangeLog:1.198
--- ccvs/contrib/ChangeLog:1.197 Wed May 17 19:27:54 2006
+++ ccvs/contrib/ChangeLog Mon May 22 15:08:25 2006
@@ -1,3 +1,8 @@
+2006-05-22 Derek Price <address@hidden>
+
+ * log_accum.pl (mail_separate_diffs): Include the last diff.
+ (Original patch from Sylvain Beucler <address@hidden>.)
+
2006-05-17 Derek Price <address@hidden>
* log_accum.pl (write_file, append_file): Don't write empty lists.
Index: ccvs/contrib/log_accum.pl
diff -u ccvs/contrib/log_accum.pl:1.33 ccvs/contrib/log_accum.pl:1.34
--- ccvs/contrib/log_accum.pl:1.33 Wed May 17 19:27:54 2006
+++ ccvs/contrib/log_accum.pl Mon May 22 15:08:25 2006
@@ -1,4 +1,4 @@
-#! @PERL@ -T
+#! /usr/bin/perl -T
# -*-Perl-*-
# Copyright (C) 1994-2006 The Free Software Foundation, Inc.
@@ -779,28 +779,44 @@
{
my ($mail_to, $module, $branch, $username, $fullname, $mailname,
$header, @diffs) = @_;
- my ($subject, @onediff);
- foreach (@diffs)
+ # Sample diff:
+# Index: subdir/subfile3
+# ===================================================================
+# RCS file: /sources/testyeight/testyeight/subdir/subfile3,v
+# retrieving revision 1.18
+# retrieving revision 1.19
+# diff -u -b -r1.18 -r1.19
+# --- subdir/subfile3 20 May 2006 11:35:55 -0000 1.18
+# +++ subdir/subfile3 20 May 2006 11:37:01 -0000 1.19
+# @@ -1 +1 @@
+# -$Id: log_accum.pl,v 1.34 2006/05/22 15:08:25 dprice Exp $
+# +$Id: log_accum.pl,v 1.34 2006/05/22 15:08:25 dprice Exp $
+
+ while (@diffs)
{
- chomp;
- if (/^Index: /)
+ my ($subject, @onediff);
+
+ do
{
- if (@onediff)
+ # Set the subject when the path to the RCS archive is found.
+ if ($diffs[0] =~ /^RCS file: (.*)$/)
{
- mail_notification $mail_to, $module, $username, $fullname,
- $mailname, $subject, @$header, @onediff;
+ $subject = $1;
+ $subject =~ s/^\Q$ENV{'CVSROOT'}\E\///;
+ $subject = "Changes to $subject";
+ $subject .= " [$branch]" if $branch;
}
- undef @onediff;
- }
- elsif (/^RCS file: (.*)$/)
- {
- $subject = $1;
- $subject =~ s/^\Q$ENV{'CVSROOT'}\E//;
- $subject = "Changes to $subject";
- $subject .= " [$branch]" if $branch;
- }
- push @onediff, $_;
+
+ # The current line is always part of the unsent diff.
+ push @onediff, shift @diffs;
+
+ # /^Index: / starts another diff...
+ } while @diffs and $diffs[0] !~ /^Index: /;
+
+ # Send the curent diff.
+ mail_notification $mail_to, $module, $username, $fullname,
+ $mailname, $subject, @$header, @onediff;
}
}
- [Cvs-cvs] ccvs/contrib ChangeLog log_accum.pl, (continued)
- [Cvs-cvs] ccvs/contrib ChangeLog log_accum.pl, Derek Robert Price, 2006/05/09
- [Cvs-cvs] ccvs/contrib ChangeLog log_accum.pl, Derek Robert Price, 2006/05/11
- [Cvs-cvs] ccvs/contrib ChangeLog log_accum.pl, Derek Robert Price, 2006/05/12
- [Cvs-cvs] ccvs/contrib ChangeLog log_accum.pl, Derek Robert Price, 2006/05/12
- [Cvs-cvs] ccvs/contrib ChangeLog log_accum.pl, Derek Robert Price, 2006/05/12
- [Cvs-cvs] ccvs/contrib ChangeLog log_accum.pl, Derek Robert Price, 2006/05/13
- [Cvs-cvs] ccvs/contrib ChangeLog log_accum.pl, Derek Robert Price, 2006/05/14
- [Cvs-cvs] ccvs/contrib ChangeLog log_accum.pl, Derek Robert Price, 2006/05/14
- [Cvs-cvs] ccvs/contrib ChangeLog log_accum.pl, Derek Robert Price, 2006/05/15
- [Cvs-cvs] ccvs/contrib ChangeLog log_accum.pl, Derek Robert Price, 2006/05/17
- [Cvs-cvs] ccvs/contrib ChangeLog log_accum.pl,
Derek Robert Price <=
- [Cvs-cvs] ccvs/contrib ChangeLog log_accum.pl, Derek Robert Price, 2006/05/22
- [Cvs-cvs] ccvs/contrib ChangeLog log_accum.pl, Derek Robert Price, 2006/05/22
- [Cvs-cvs] ccvs/contrib ChangeLog log_accum.pl, Derek Robert Price, 2006/05/22
- [Cvs-cvs] ccvs/contrib ChangeLog log_accum.pl, Derek Robert Price, 2006/05/23