head	1.7;
access;
symbols
	TIGRIS_1_1_0RC2:1.6
	TIGRIS_1_1_0RC1:1.6
	TIGRIS_1_1:1.6.0.12
	TIGRIS_1_0_8:1.6
	TIGRIS_1_0_8RC3:1.6
	TIGRIS_1_0_8RC2:1.6
	TIGRIS_1_0_8RC1:1.6
	TIGRIS_1_0_7:1.6
	TIGRIS_1_0_7RC3:1.6
	TIGRIS_1_0_7RC2:1.6
	TIGRIS_1_0_7RC1:1.6
	TIGRIS_1_0_6:1.6
	TIGRIS_1_0_6RC5:1.6
	TIGRIS_1_0_6RC4:1.6
	TIGRIS_1_0_6RC3:1.6
	TIGRIS_1_0_6RC2:1.6
	TIGRIS_1_0_6RC1:1.6
	TIGRIS_1_0_5:1.6
	TIGRIS_1_0_5RC6:1.6
	TIGRIS_1_0_5RC5:1.6
	TIGRIS_1_0_5RC4:1.6
	TIGRIS_1_0_5RC3:1.6
	TIGRIS_1_0_5RC2:1.6
	TIGRIS_1_0_5RC1:1.6
	TIGRIS_1_0_4:1.6
	TIGRIS_1_0_3:1.6
	TIGRIS_1_0_2:1.6
	TIGRIS_1_0_1:1.6
	TIGRIS_1_0:1.6.0.14
	TIGRIS_1_0_0:1.6
	TIGRIS_1_0_0_RC1:1.6.0.10
	dlr:1.1.1
	TIGRIS_0_9_2_4:1.6
	TIGRIS_0_9_2_3:1.6
	HELM_PEER_PORT_BRANCH:1.1.1.1
	TURBINE_PEER:1.6
	TIGRIS_0_9_2_1:1.6
	TIGRIS_0_9_2:1.6.0.8
	TIGRIS_0_9_0:1.6.0.6
	TIGRIS_0_8_4:1.6.0.4
	NEWHELM:1.1.1.1
	TIGRIS_NOV_12_2000:1.1.1
	OLDHELM:1.6.0.2
	TIGRIS_NOV_11_2000:1.6
	TIGRIS_SEP_13_2000:1.3.0.2
	TIGRIS_BASELINE:1.6;
locks; strict;
comment	@# @;


1.7
date	2001.05.22.17.57.42;	author thom;	state dead;
branches;
next	1.6;

1.6
date	2000.09.14.19.49.37;	author kmaples;	state Exp;
branches;
next	1.5;

1.5
date	2000.09.14.19.47.05;	author kmaples;	state Exp;
branches;
next	1.4;

1.4
date	2000.09.14.19.45.02;	author kmaples;	state Exp;
branches;
next	1.3;

1.3
date	2000.09.05.21.49.16;	author thom;	state Exp;
branches;
next	1.2;

1.2
date	2000.09.05.21.47.33;	author thom;	state Exp;
branches;
next	1.1;

1.1
date	2000.07.11.21.15.44;	author dlr;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2000.11.12.21.14.07;	author dlr;	state Exp;
branches;
next	;


desc
@@


1.7
log
@remove the use of log_accum and commit_prep. this is now replaced with
logchange.pl and logchange.config
Issue number:  2528, 2577, 3002
Obtained from:
Submitted by:
Reviewed by:
@
text
@#!/usr/bin/perl -wU
#
# Perl filter to handle pre-commit checking of files.  This program
# records the last directory where commits will be taking place for
# use by the log_accum.pl script.
#
# IMPORTANT: this script interacts with log_accum, they have to agree
# on the tmpfile name to use.  See $LAST_FILE below.
#
# Contributed by David Hampton <hampton@@cisco.com>
# Stripped to minimum by Roy Fielding
#
############################################################
$TMPDIR        = $ENV{'TMPDIR'} || '/tmp';
$FILE_PREFIX   = '#cvs.';

# If see a "-u $USER" argument, then destructively remove it from the
# argument list, so $ARGV[0] will be the repository dir again, as it
# used to be before we added the -u flag.
if ($ARGV[0] eq '-u') {
  shift @@ARGV;
  $CVS_USERNAME = shift (@@ARGV);
}

# This needs to match the corresponding var in log_accum.pl, including
# the appending of the pgrp and username suffixes (see uses of this
# var farther down).
$LAST_FILE = "$TMPDIR/${FILE_PREFIX}lastdir";

sub write_line {
    my ($filename, $line) = @@_;

# A check of some kind is needed here, but the rules aren't apparent
# at the moment:

#    foreach($filename, $line){	
#        $_ =~ m#^([-\@@\w.\#]+)$#;
#        $_ = $1;
#    }

    open(FILE, ">$filename") || die("Cannot open $filename: $!\n");
    print(FILE $line, "\n");
    close(FILE);
}

#
# Record this directory as the last one checked.  This will be used
# by the log_accumulate script to determine when it is processing
# the final directory of a multi-directory commit.
#
$id = getpgrp();

&write_line("$LAST_FILE.$id.$CVS_USERNAME", $ARGV[0]);

exit(0);
@


1.6
log
@Commented out regex that was being used to validate input.
@
text
@@


1.5
log
@Fixed typo
@
text
@d33 7
a39 4
    foreach($filename, $line){	
        $_ =~ m#^([-\@@\w.\#]+)$#;
        $_ = $1;
    }
@


1.4
log
@Changes to permit execution by setuid scripts
@
text
@d34 1
a34 1
        $_ =~ m#^([-\@@\w.#]+)$#;
@


1.3
log
@merge the revision history from cvspatches/root/commit_prep

date: 2000/07/29 00:30:32;  author: kfogel;  state: Exp;  lines: +6 -3
Put in comments explaining how commit_prep and log_accum interact, and
how log_accum interacts with past and future invocations of itself.
@
text
@d1 1
a1 1
#!/usr/bin/perl
d31 6
a36 1
    local($filename, $line) = @@_;
@


1.2
log
@merge the revision history from cvspatches/root/commit_prep

Fixes for:
   http://www.netbeans.org/bugs-cgi/show_bug.cgi?id=7052
   http://www.netbeans.org/bugs-cgi/show_bug.cgi?id=6931

commitinfo now passes "-u $USER" to commit_prep.

commit_prep and log_accum now agree to append the committer's
cvs-username onto their tmp files, so overlapping commits by different
people don't get mixed up.
@
text
@d7 3
d25 3
a27 3
# IMPORTANT: use this in a way that matches the usage of the
# same-named var in log_accum.pl, including the appending of the pgrp
# and username suffixes that happens later on.
@


1.1
log
@Moved here from sandbox/tigrisc/repository/CVSROOT and redone.
@
text
@d14 12
a25 1
$LAST_FILE     = "$TMPDIR/${FILE_PREFIX}lastdir"; # MUST match log_accum.pl
d42 1
a42 1
&write_line("$LAST_FILE.$id", $ARGV[0]);
@


1.1.1.1
log
@Merging newhelm tree into helm, as per IZ issue #557.  Previous major version of helm is tagged TIGRIS_NOV_11_2000.
@
text
@d1 1
a1 1
#!/usr/bin/perl -wU
a6 3
# IMPORTANT: this script interacts with log_accum, they have to agree
# on the tmpfile name to use.  See $LAST_FILE below.
#
d14 1
a14 12
# If see a "-u $USER" argument, then destructively remove it from the
# argument list, so $ARGV[0] will be the repository dir again, as it
# used to be before we added the -u flag.
if ($ARGV[0] eq '-u') {
  shift @@ARGV;
  $CVS_USERNAME = shift (@@ARGV);
}

# This needs to match the corresponding var in log_accum.pl, including
# the appending of the pgrp and username suffixes (see uses of this
# var farther down).
$LAST_FILE = "$TMPDIR/${FILE_PREFIX}lastdir";
d17 1
a17 9
    my ($filename, $line) = @@_;

# A check of some kind is needed here, but the rules aren't apparent
# at the moment:

#    foreach($filename, $line){	
#        $_ =~ m#^([-\@@\w.\#]+)$#;
#        $_ = $1;
#    }
d31 1
a31 1
&write_line("$LAST_FILE.$id.$CVS_USERNAME", $ARGV[0]);
@


