#!/usr/bonsaitools/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil -*- # # The contents of this file are subject to the Netscape Public # License Version 1.1 (the "License"); you may not use this file # except in compliance with the License. You may obtain a copy of # the License at http://www.mozilla.org/NPL/ # # Software distributed under the License is distributed on an "AS # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or # implied. See the License for the specific language governing # rights and limitations under the License. # # The Original Code is the Bonsai CVS tool. # # The Initial Developer of the Original Code is Netscape Communications # Corporation. Portions created by Netscape are # Copyright (C) 1998 Netscape Communications Corporation. All # Rights Reserved. # # Contributor(s): require 'CGI.pl'; use strict; sub StupidFuncToShutUpWarningsByUsingVarsAgain { my $z; $z = $::TreeOpen; $z = $::CloseTimeStamp; } Lock(); LoadCheckins(); LoadMOTD(); LoadTreeConfig(); Unlock(); my $BIP = BatchIdPart('?'); my $BIP_nohook = BatchIdPart(); print "Content-type: text/html\n\n"; PutsHeader("Bonsai Administration [`$::TreeID' Tree]", "Bonsai Administration", "Administrating `$::TreeID' Tree"); print <
You realize, of course, that you have to know the magic password to do anything from here.


EOF TweakCheckins(); CloseTree(); TweakTimestamps(); ChangeMOTD(); EditEmailMessage(); RebuildHook(); RebuildHistory(); ChangePasswd(); PutsTrailer(); exit 0; sub TweakCheckins { print qq( Go tweak bunches of checkins at once.
Edit Bonsai operating parameters.
); } sub CloseTree { # Actually opens tree also my $timestamp = value_quote(MyFmtClock(time)); print qq(
Password:
); if ($::TreeOpen) { print qq( Closing time stamp is:
); } else { print qq( The new \"good\" timestamp is:
Clear the list of checkins.
); } print qq(
\n
\n\n); } sub TweakTimestamps { my $lg_timestamp = value_quote(MyFmtClock($::LastGoodTimeStamp)); my $c_timestamp = value_quote(MyFmtClock($::CloseTimeStamp)); print qq(
Password:
Last good timestamp:
Last close timestamp:

); } sub ChangeMOTD { my $motd = value_quote($::MOTD); print qq(
Password:
Change the message-of-the-day:


); } sub EditEmailMessage { print qq(
Change the e-mail message sent:

); } sub RebuildHook { my $lg_timestamp = value_quote(MyFmtClock($::LastGoodTimeStamp)); print qq(
Password:
Repopulate the hook from scratch.

This can be very dangerous.
You should usually only need to do this to populate a new Bonsai branch.

Use any checkin since:


); } sub RebuildHistory { my $timestamp = value_quote(MyFmtClock(0)); print qq(
Password:
Recreate the entire list of every checkin ever done to the $::TreeInfo{$::TreeID}{repository} repository from scratch.

This can take an incredibly long time.
You should usually only need to do this when first introducing an entire CVS repository into Bonsai.

Ignore checkins earlier than:
Ignore files before (must be full path starting with $::TreeInfo{$::TreeID}{repository}; leave blank to do everything):
Only do files within the subdirectory of $::TreeInfo{$::TreeID}{repository} named:


); } sub ChangePasswd { print qq(
Change password.
Old password:
New password:
Retype new password:
Change password for this tree
Change master Bonsai password
); }