update_branches revision ec5347e2c775f027573ce5648b910361aa926c01
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# Copyright (C) 2005, 2007 Internet Systems Consortium, Inc. ("ISC")
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# Permission to use, copy, modify, and/or distribute this software for any
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# purpose with or without fee is hereby granted, provided that the above
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# copyright notice and this permission notice appear in all copies.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# PERFORMANCE OF THIS SOFTWARE.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# $Id: update_branches,v 1.22 2007/06/18 23:47:57 tbox Exp $
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# Track which branches are still open or not in the bind9 cvs repository.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# This is done so that work that is "in progress" (active) doesn't get
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# so easily forgotten about.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# This script updates doc/private/branches by adding new branches and moving
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# closed branches to the end of the file. New branches are found by walking
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# the cvs repository and extracting the new branches from the header fields
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# of the files there.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# doc/private/branches has one line per branch in the following field order:
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# name, status, to whom the branch belongs and comments. Comments are
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# in '(',')'. The first three field are single words.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# Note: this is intended to be run on the machine hosting the CVS repository.
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar%history = ();
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# Make sure we have a up to date copy. If the previous ran failed for
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# any reason remove it (-C).
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar!system("cvs", "-d", $repository, "update", "-C", "doc/private/branches") || die "cannot update doc/private/branches: $!";
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdar# load existing content
2654012f83cec5dc15b61dfe3e4a4915f186e7a6Reza Sabdaropen(BRANCHES, "<doc/private/branches") || die "can't open util/branches: $!";
my $branch;
my $status;
my $who;
my $tag;
my $date;
my $time;
my $tz;
my $who;
my $mod;
my $branch;
s:^$repository/::;
$tabs = 1;
$tabs++;
$tabs = 1;
$tabs++;
rename("doc/private/newbranches", "doc/private/branches") || die "Cannot rename: doc/private/newbranches -> doc/private/branches: $!";