diff options
author | fuzzyray <fuzzyray@gentoo.org> | 2008-11-11 19:03:17 +0000 |
---|---|---|
committer | fuzzyray <fuzzyray@gentoo.org> | 2008-11-11 19:03:17 +0000 |
commit | badd2834bea490d5b470b172be725f8ecff9d4a9 (patch) | |
tree | d1a58310a950301c7d39499a30b057ea5ba60b12 | |
parent | Fix echangelog to properly identify added ebuilds. (Bug #176337) (diff) | |
download | gentoolkit-badd2834bea490d5b470b172be725f8ecff9d4a9.tar.gz gentoolkit-badd2834bea490d5b470b172be725f8ecff9d4a9.tar.bz2 gentoolkit-badd2834bea490d5b470b172be725f8ecff9d4a9.zip |
Add strict option to echangelog to exit when no changed ebuilds found. (Bug 246226)
svn path=/; revision=519
-rw-r--r-- | trunk/ChangeLog | 3 | ||||
-rw-r--r-- | trunk/src/echangelog/echangelog | 10 |
2 files changed, 12 insertions, 1 deletions
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 <fuzzyray@gentoo.org> + * echangelog: Add --strict option (Bug 246242). + 2008-09-17: Paul Varner <fuzzyray@gentoo.org> * 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 } |