update_branches revision 64cde9d94a2f6c7050f00d9651df6b05e63d09f2
#
# Copyright (C) 2005 Internet Systems Consortium, Inc. ("ISC")
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
# $Id: update_branches,v 1.6 2005/05/16 07:02:22 marka Exp $
%branches = ();
%whom = ();
%comments = ();
!system("cvs", "-d", "/proj/cvs/prod", "update", "doc/private/branches") || die "cannot update doc/private/branches: $!";
#
# load existing content
#
while (<BRANCHES>) {
next if (/^-/);
$c = "";
if (m/\(.*\)/) {
$c = $_;
$c =~ s/.*(\(.*\)).*$/$1/;
s/\(.*\)//;
}
s/\s$//;
next if (/^\s*$/);
}
#
# Search repository for new branches.
#
while (<FILES>) {
# print "file: $_\n"; # debug
# $file = $_; # save for branch debug below.
next unless m/\.0\.\d$/; # skip if not a branch
s/\s(.*):.*/$1/; # extract label
# print "branch: $_ $file\n"; # debug
}
}
last;
}
}
#
# Write out updated version.
#
print BRANCHES "\nBranch\t\t\t\tStatus\tWhom\t(Comments)\n";
print BRANCHES "----------------------------------------------------------\n\n";
$tabs = 1;
} else {
$tabs++;
}
}
}
}
print BRANCHES "\n\n";
$tabs = 1;
} else {
$tabs++;
}
}
}
}
#
# Update if changed.
#
rename("doc/private/newbranches", "doc/private/branches") || die "Cannot rename: doc/private/newbranches -> doc/private/branches: $!";
!system("cvs", "-d", "/proj/cvs/prod", "commit", "-m", "auto update", "doc/private/branches") || die "cvs commit failed: $!";
} else {
}