summaryrefslogtreecommitdiff
path: root/trunk/src
diff options
context:
space:
mode:
authorfuzzyray <fuzzyray@gentoo.org>2008-11-11 19:03:17 +0000
committerfuzzyray <fuzzyray@gentoo.org>2008-11-11 19:03:17 +0000
commitbadd2834bea490d5b470b172be725f8ecff9d4a9 (patch)
treed1a58310a950301c7d39499a30b057ea5ba60b12 /trunk/src
parent7b6eee352790ad3874d8a2c84d2b07682b2e39d7 (diff)
downloadgentoolkit-badd2834bea490d5b470b172be725f8ecff9d4a9.tar.gz
Add strict option to echangelog to exit when no changed ebuilds found. (Bug 246226)
svn path=/; revision=519
Diffstat (limited to 'trunk/src')
-rw-r--r--trunk/src/echangelog/echangelog10
1 files changed, 9 insertions, 1 deletions
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
}