From ec87a808c57c85f4a7794db85d39fc1dd3870b81 Mon Sep 17 00:00:00 2001 From: agriffis Date: Mon, 8 Nov 2004 21:40:37 +0000 Subject: [PATCH] * 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 --- trunk/src/echangelog/ChangeLog | 5 +++++ trunk/src/echangelog/echangelog | 17 ++++++++++------- 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 + * 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 * 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/; $text =~ s//$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 () { /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"; $_ = ; 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\//, ); +} + # vim:sw=4 ts=8 expandtab -- 2.26.2