check-pullups.pl revision 0c27b3fe77ac1d5094ba3521e8142d9e7973133f
#
# Copyright (C) 2001-2004, 2007, 2012, 2016 Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# $Id$
# Given two CHANGES files, list [bug] entries present in the
# first one but not in the second one.
#
use FileHandle;
# $/ = "";
# Read the CHANGES file $fn and return a hash of change
# texts and categories indexed by change number.
sub readfile {
my ($fn) = @_;
or die "open: $fn: $!";
my $changes = { };
$changeid = "none";
$category = "none";
while (<$fh>) {
if (m/^\s*(\d+)\.\s+\[(\w+)\]/) {
$changeid = $1;
$category = $2;
# print "*** $1 $2\n";
} elsif (m/---.* released ---/) {
$changeid = "none";
$category = "none";
next;
} elsif (m/^# /) {
$changeid = "none";
$category = "none";
next;
}
if ($changeid eq "none") {
next;
}
}
return $changes;
}
if (@ARGV == 3) {
} else {
my $c3 = { };
}
my $msg = "";
foreach my $c (sort {$a <=> $b} keys %$c1) {
if ($msg ne "MISSING\n") {
$msg = "MISSING\n";
print $msg;
}
}
if ($msg ne "TEXT\n") {
$msg = "TEXT\n";
print $msg;
}
}
}