summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoragriffis <agriffis@gentoo.org>2004-11-08 21:40:37 +0000
committeragriffis <agriffis@gentoo.org>2004-11-08 21:40:37 +0000
commitec87a808c57c85f4a7794db85d39fc1dd3870b81 (patch)
treecdb090fbeaedc0b391c4802da98d064acafde6a1
parent3a4b57fb71d24ee04649831054364f0394b20f73 (diff)
downloadgentoolkit-ec87a808c57c85f4a7794db85d39fc1dd3870b81.tar.gz
* call cvs with -f to refrain from using .cvsrc, which might
contain conflicting options * fix auto-addition of ChangeLog; last attempt was broken svn path=/; revision=167
-rw-r--r--trunk/src/echangelog/ChangeLog5
-rw-r--r--trunk/src/echangelog/echangelog17
2 files changed, 15 insertions, 7 deletions
diff --git a/trunk/src/echangelog/ChangeLog b/trunk/src/echangelog/ChangeLog
index b98080a..059d937 100644
--- a/trunk/src/echangelog/ChangeLog
+++ b/trunk/src/echangelog/ChangeLog
@@ -1,3 +1,8 @@
+08 Nov 2004 Aron Griffis <agriffis@gentoo.org>
+ * call cvs with -f to refrain from using .cvsrc, which might
+ contain conflicting options
+ * fix auto-addition of ChangeLog; last attempt was broken
+
03 Nov 2004 Aron Griffis <agriffis@gentoo.org>
* abort when there are unresolved files (files that aren't under
revision control) just like repoman
diff --git a/trunk/src/echangelog/echangelog b/trunk/src/echangelog/echangelog
index cbe6f36..65b2edd 100644
--- a/trunk/src/echangelog/echangelog
+++ b/trunk/src/echangelog/echangelog
@@ -45,17 +45,13 @@ if (-f 'ChangeLog') {
$text =~ s/^\*.*//ms; # don't need the fake entry
$text =~ s/<CATEGORY>/$category/;
$text =~ s/<PACKAGE_NAME>/$package_name/;
- # Okay, now we have a starter ChangeLog to work with.
- # The text will be added just like with any other ChangeLog below.
- # Add the new ChangeLog to cvs before continuing.
- system("cvs add ChangeLog");
} else {
die "This should be run in a directory with ebuilds...\n";
}
}
# Figure out what has changed around here
-open C, 'cvs -n up 2>&1 |' or die "Can't run cvs -n up: $!\n";
+open C, 'cvs -fn up 2>&1 |' or die "Can't run cvs -fn up: $!\n";
while (<C>) {
/ChangeLog/ and next;
/^\? (\S+)/ and push @unknown, $1;
@@ -68,7 +64,7 @@ if (@unknown) {
Cvs reports the following unknown files. Please use "cvs add" before
running echangelog, or remove the files in question.
EOT
- print STDERR "? ", join("\n ?", @unknown), "\n";
+ print STDERR "? ", join("\n? ", @unknown), "\n";
exit 1;
}
@@ -77,7 +73,7 @@ EOT
@ebuilds = grep /\.ebuild$/, @files;
@files = grep !/\.ebuild$/, @files;
if (@ebuilds) {
- open C, "cvs diff -U 0 @ebuilds 2>&1 |" or die "Can't run cvs diff: $!\n";
+ open C, "cvs diff -fU 0 @ebuilds 2>&1 |" or die "Can't run cvs diff: $!\n";
$_ = <C>;
while (defined $_) {
if (/^cvs diff: (([^\/]*?)\.ebuild) was removed/) {
@@ -278,4 +274,11 @@ close D;
system 'diff -Nu ChangeLog ChangeLog.new';
rename 'ChangeLog.new', 'ChangeLog' or die "Can't rename ChangeLog.new: $!\n";
+# Okay, now we have a starter ChangeLog to work with.
+# The text will be added just like with any other ChangeLog below.
+# Add the new ChangeLog to cvs before continuing.
+if (open F, "CVS/Entries") {
+ system("cvs -f add ChangeLog") unless (scalar grep /^\/ChangeLog\//, <F>);
+}
+
# vim:sw=4 ts=8 expandtab