From 05dc14f1d04b12d38a83ff21dc0f5f54b9864e57 Mon Sep 17 00:00:00 2001 From: agriffis Date: Wed, 27 Apr 2005 23:30:41 +0000 Subject: [PATCH] * more changes for #90326; report all trivial files if no significant changes can be found svn path=/; revision=211 --- trunk/src/echangelog/ChangeLog | 4 +++ trunk/src/echangelog/echangelog | 55 ++++++++++++++++++++------------- 2 files changed, 38 insertions(+), 21 deletions(-) diff --git a/trunk/src/echangelog/ChangeLog b/trunk/src/echangelog/ChangeLog index d5215eb..ffafb66 100644 --- a/trunk/src/echangelog/ChangeLog +++ b/trunk/src/echangelog/ChangeLog @@ -1,3 +1,7 @@ +27 Apr 2005 Aron Griffis + * more changes for #90326; report all trivial files if no significant + changes can be found + 26 Apr 2005 Aron Griffis * detect conflicts explicitly * report ChangeLog in the list of files if it's the only file that is diff --git a/trunk/src/echangelog/echangelog b/trunk/src/echangelog/echangelog index f8c795a..a06115c 100644 --- a/trunk/src/echangelog/echangelog +++ b/trunk/src/echangelog/echangelog @@ -19,13 +19,8 @@ $Text::Wrap::columns = 77; $Text::Wrap::unexpand = 0; # Global variables -my (@files) = (); -my (@ebuilds) = (); -my (@conflicts) = (); -my (@unknown) = (); +my (@files, @ebuilds, @conflicts, @trivial, @unknown, @new_versions, %actions); my ($input, $editor, $entry, $user, $date, $text, $version, $year); -my (@new_versions) = (); -my (%actions) = (); # Read the current ChangeLog if (-f 'ChangeLog') { @@ -54,13 +49,28 @@ if (-f 'ChangeLog') { # Figure out what has changed around here open C, 'cvs -fn up 2>&1 |' or die "Can't run cvs -fn up: $!\n"; while () { - /ChangeLog/ and next; - /^\? (\S+)/ and do { push @unknown, $1; next; }; - /^C (\S+)/ and do { push @conflicts, $1; next; }; - /^([ARM]) (\S+)/ or next; - push @files, $2; - ($actions{$2} = $1) =~ tr/ARM/+-/d; + if (/^C (\S+)/) { + push @conflicts, $1; + next; + } elsif (/^\? (\S+)/) { + push @unknown, $1; + $actions{$1} = '+'; + next; + } elsif (/^([ARM]) (\S+)/) { + push @files, $2; + ($actions{$2} = $1) =~ tr/ARM/+-/d; + } } + +# Separate out the trivial files for now +@files = grep { + !/files.digest|Manifest|ChangeLog/ or do { push @trivial, $_; 0; } +} @files; +@unknown = grep { + !/files.digest|Manifest|ChangeLog/ or do { push @trivial, $_; 0; } +} @unknown; + +# Don't allow any conflicts if (@conflicts) { print STDERR <; close I; } else { - print STDERR "Error opening .#ChangeLog: $!\n"; + print STDERR "Error opening ChangeLog.new: $!\n"; print STDERR "Reverting to stdin method.\n"; undef $editor; } - unlink '.#ChangeLog'; + unlink 'ChangeLog.new'; } } unless ($editor) { @@ -275,7 +288,7 @@ unless ($user = $ENV{'ECHANGELOG_USER'}) { die "Please set ECHANGELOG_USER or run as non-root\n" if $user =~ /