aboutsummaryrefslogtreecommitdiffstats
path: root/CVSROOT/logcheck
diff options
context:
space:
mode:
authorjoe <joe@FreeBSD.org>2001-05-13 06:16:17 +0800
committerjoe <joe@FreeBSD.org>2001-05-13 06:16:17 +0800
commit4714b5567607bd982cbc0ba15702ffdfd6a3ad83 (patch)
treea214eacf5b751d8df8fe74525380a21773678b74 /CVSROOT/logcheck
parent08cbaa8700f0e38ff41ba69966564bd6ac1a79c5 (diff)
downloadfreebsd-ports-gnome-4714b5567607bd982cbc0ba15702ffdfd6a3ad83.tar.gz
freebsd-ports-gnome-4714b5567607bd982cbc0ba15702ffdfd6a3ad83.tar.zst
freebsd-ports-gnome-4714b5567607bd982cbc0ba15702ffdfd6a3ad83.zip
Recently Maxim Sobolev <sobomax@FreeBSD.org> introduced an MFC
notification service driven from 'MFC after:' headers in the commit message. This commit adds 'MFC after:' into the rcstemplate and associated code to make sure that if it's used it's used correctly. Based upon code submitted by Maxim Sobolev <sobomax@FreeBSD.org>. Submitted by: sobomax
Diffstat (limited to 'CVSROOT/logcheck')
-rwxr-xr-xCVSROOT/logcheck12
1 files changed, 12 insertions, 0 deletions
diff --git a/CVSROOT/logcheck b/CVSROOT/logcheck
index fdec5dbca358..1f03cb27b952 100755
--- a/CVSROOT/logcheck
+++ b/CVSROOT/logcheck
@@ -50,6 +50,18 @@ while(<IN>) {
/^PR:$/i) {
next;
}
+
+ # Special handling for type checking the 'MFC after' field.
+ if (/^MFC after:\s*(.*)$/) {
+ # Ignore it if no value was filled in.
+ next unless $1;
+
+ unless ($1 =~ /[\d]+ (days?|weeks?)$/) {
+ print "Parse error in 'MFC after:'\n";
+ exit 1;
+ }
+ }
+
if ($blank && $first) {
# Previous line(s) was blank, this isn't. Close the
# collapsed section.