summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2003-04-22 12:16:01 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2003-04-22 12:16:01 +0000
commit2c93ee119a4712affbcf166f064c7a3dae1567c9 (patch)
treebd124aac30f321203b10df54f4480633934e2957
parentabd67517b3f5df70bec1903c740e0967ae297c0d (diff)
downloadATCD-2c93ee119a4712affbcf166f064c7a3dae1567c9.tar.gz
ChangeLogTag: Tue Apr 22 07:10:14 2003 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r--ChangeLog10
-rw-r--r--bin/ChangeLogEditor/ChangeLogEdit.pm3
-rw-r--r--bin/ChangeLogEditor/ChangeLogEntry.pm3
-rw-r--r--bin/ChangeLogEditor/FileLocator.pm3
-rwxr-xr-xbin/cle.pl27
5 files changed, 36 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index db4ad76fb0b..e2132436186 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+Tue Apr 22 07:10:14 2003 Chad Elliott <elliott_c@ociweb.com>
+
+ * bin/ChangeLogEditor/ChangeLogEdit.pm:
+ * bin/ChangeLogEditor/ChangeLogEntry.pm:
+ * bin/ChangeLogEditor/FileLocator.pm:
+ * bin/cle.pl:
+
+ Allow the user to specify directories to be considered for the
+ ChangeLog entry.
+
Tue Apr 22 12:43:17 2003 Simon McQueen <sm@prismtechnologies.com>
* tests/Proactor_Scatter_Gather_Test.cpp:
diff --git a/bin/ChangeLogEditor/ChangeLogEdit.pm b/bin/ChangeLogEditor/ChangeLogEdit.pm
index b75841ed4a5..16587eb03dc 100644
--- a/bin/ChangeLogEditor/ChangeLogEdit.pm
+++ b/bin/ChangeLogEditor/ChangeLogEdit.pm
@@ -34,6 +34,7 @@ sub new {
sub edit {
my($self) = shift;
my($ofile) = shift;
+ my(@dirs) = @_;
my($tfile) = "$ofile.$<.$$";
my($status) = 0;
my($error) = '';
@@ -44,7 +45,7 @@ sub edit {
my($creator) = new ChangeLogEntry($self->{'name'},
$self->{'email'});
my($entry) = '';
- ($entry, $unknown) = $creator->create();
+ ($entry, $unknown) = $creator->create(@dirs);
if (defined $entry) {
if ($entry =~ /^ERROR:/) {
$error = $entry;
diff --git a/bin/ChangeLogEditor/ChangeLogEntry.pm b/bin/ChangeLogEditor/ChangeLogEntry.pm
index 2f57d6f3102..3b91f3e1882 100644
--- a/bin/ChangeLogEditor/ChangeLogEntry.pm
+++ b/bin/ChangeLogEditor/ChangeLogEntry.pm
@@ -70,11 +70,12 @@ sub sortFileList {
sub create {
my($self) = shift;
+ my(@dirs) = @_;
my($fl) = new FileLocator();
my($modif,
$remov,
$confl,
- $unknown) = $fl->locate();
+ $unknown) = $fl->locate(@dirs);
my($entry) = scalar(localtime());
if (defined $$confl[0]) {
diff --git a/bin/ChangeLogEditor/FileLocator.pm b/bin/ChangeLogEditor/FileLocator.pm
index 4c050122e75..5dd3fc0e7e6 100644
--- a/bin/ChangeLogEditor/FileLocator.pm
+++ b/bin/ChangeLogEditor/FileLocator.pm
@@ -27,6 +27,7 @@ sub new {
sub locate {
my($self) = shift;
+ my(@dirs) = @_;
my($fh) = new FileHandle();
my(@modified) = ();
my(@removed) = ();
@@ -36,7 +37,7 @@ sub locate {
my($nul) = ($^O eq 'MSWin32' ? 'nul' : '/dev/null');
if (open($fh, 'cvs -q ' . (defined $cvsroot ? "-d $cvsroot " : '') .
- "-n update 2> $nul |")) {
+ "-n update @dirs 2> $nul |")) {
while(<$fh>) {
my($line) = $_;
if ($line =~ /^[AM]\s+(.*)/) {
diff --git a/bin/cle.pl b/bin/cle.pl
index 72ed9169be5..ff490000734 100755
--- a/bin/cle.pl
+++ b/bin/cle.pl
@@ -132,7 +132,8 @@ sub usageAndExit {
if (defined $arg) {
print "$arg\n\n";
}
- print "Usage: $base [ChangeLog File] [user name] [email address]\n\n" .
+ print "Usage: $base [ChangeLog File] [user name] [email address]\n" .
+ " " . (' ' x length($base)) . "[-d <dir1 dir2 ... dirN>]\n\n" .
" Uses cvs to determine which files are modified or added\n" .
" and generates a bare ChangeLog entry based on those files.\n" .
" This script should be run at the same directory level in\n" .
@@ -153,7 +154,11 @@ sub usageAndExit {
"\n" .
" The user name and email address can be passed as a parameter to\n" .
" this script. If either is not passed, then the script will try\n" .
- " to determine it automatically.\n";
+ " to determine it automatically.\n" .
+ "\n" .
+ " If -d is used, everything on the command line after it is\n" .
+ " considered a directory or file to be considered in the\n" .
+ " ChangeLog entry.\n";
exit(0);
}
@@ -162,14 +167,22 @@ sub usageAndExit {
# Subroutine Section
# ************************************************************
-my($file) = undef;
-my($name) = undef;
-my($email) = undef;
+my($file) = undef;
+my($name) = undef;
+my($email) = undef;
+my(@dirs) = ();
+my($restdirs) = 0;
foreach my $arg (@ARGV) {
- if ($arg eq '-h') {
+ if ($restdirs) {
+ push(@dirs, $arg);
+ }
+ elsif ($arg eq '-h') {
usageAndExit();
}
+ elsif ($arg eq '-d') {
+ $restdirs = 1;
+ }
elsif ($arg =~ /^\-/) {
usageAndExit("Unrecognized parameter: $arg");
}
@@ -210,7 +223,7 @@ if (!defined $email) {
}
my($editor) = new ChangeLogEdit($name, $email);
-my($status, $error, $unknown) = $editor->edit($file);
+my($status, $error, $unknown) = $editor->edit($file, @dirs);
if (defined $unknown) {
my(@uarray) = @$unknown;