check-pullups.pl revision 70e5a7403f0e0a3bd292b8287c5fed5772c15270
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley# Copyright (C) 2004, 2007 Internet Systems Consortium, Inc. ("ISC")
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley# Copyright (C) 2001-2003 Internet Software Consortium.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley# Permission to use, copy, modify, and/or distribute this software for any
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley# purpose with or without fee is hereby granted, provided that the above
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley# copyright notice and this permission notice appear in all copies.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley# PERFORMANCE OF THIS SOFTWARE.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley# $Id: check-pullups.pl,v 1.12 2007/06/19 23:47:24 tbox Exp $
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley# Given two CHANGES files, list [bug] entries present in the
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley# first one but not in the second one.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley# Read the CHANGES file $fn and return a hash of change
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley# texts and categories indexed by change number.
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley my ($fn) = @_;
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley or die "open: $fn: $!";
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley while (<$fh>) {
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley if (m/^\s*(\d+)\.\s+\[(\w+)\]/) {
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley # print "*** $1 $2\n";
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley } elsif (m/---.* released ---/) {
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley } elsif (m/^# /) {
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley@ARGV == 2 || @ARGV == 3 or die "usage: $0 changes-file-1 changes-file-2\n";
c7ddab7655021d96211a26f99d9f694396c53284Bob Halleyforeach my $c (sort {$a <=> $b} keys %$c1) {
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley if ($category ne "func" && $category ne "placeholder" &&
c7ddab7655021d96211a26f99d9f694396c53284Bob Halley if (exists($c2->{$c}) && $category ne "placeholder" &&