From badd2834bea490d5b470b172be725f8ecff9d4a9 Mon Sep 17 00:00:00 2001 From: fuzzyray Date: Tue, 11 Nov 2008 19:03:17 +0000 Subject: [PATCH] Add strict option to echangelog to exit when no changed ebuilds found. (Bug 246226) svn path=/; revision=519 --- trunk/ChangeLog | 3 +++ trunk/src/echangelog/echangelog | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/trunk/ChangeLog b/trunk/ChangeLog index 2e13833..6656598 100644 --- a/trunk/ChangeLog +++ b/trunk/ChangeLog @@ -1,3 +1,6 @@ +2008-11-11: Paul Varner + * echangelog: Add --strict option (Bug 246242). + 2008-09-17: Paul Varner * euse: Fix check_sanity function to use get_all_make_defaults function when checking for the make.defaults files in the profile. diff --git a/trunk/src/echangelog/echangelog b/trunk/src/echangelog/echangelog index 81d6e10..f98fed5 100644 --- a/trunk/src/echangelog/echangelog +++ b/trunk/src/echangelog/echangelog @@ -21,7 +21,7 @@ $Text::Wrap::unexpand = 0; # Global variables my (@files, @ebuilds, @conflicts, @trivial, @unknown, @new_versions, %actions); -my ($input, $editor, $entry, $user, $date, $text, $version, $year, $vcs); +my ($input, $editor, $entry, $user, $date, $text, $version, $year, $vcs, $strict); my %vcs = ( cvs => { diff => "cvs -f diff -U0", status => "cvs -fn up", @@ -41,6 +41,10 @@ my %vcs = ( cvs => { diff => "cvs -f diff -U0", ); +use Getopt::Long; +$strict = 0; +GetOptions('strict' => \$strict); + # Figure out what kind of repo we are in. if ( -d "CVS" ) { @@ -360,6 +364,10 @@ unless (@files) { print STDERR "** should be run after all affected files have been added and/or\n"; print STDERR "** modified. Did you forget to $vcs add?\n"; print STDERR "**\n"; + if ($strict) { + print STDERR "** In strict mode, exiting\n"; + exit 1; + } @files = sort sortfunc @trivial; @files = qw/ChangeLog/ unless @files; # last resort to put something in the list } -- 2.26.2