From: idl0r Date: Sat, 12 Sep 2009 12:01:05 +0000 (-0000) Subject: Make --strict default, add --no-strict option. X-Git-Tag: gentoolkit-dev-0.2.6.13_rc2^2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=af1292620c4c09b5fe38ca8d46896cb45af17c7e;p=gentoolkit.git Make --strict default, add --no-strict option. svn path=/trunk/gentoolkit-dev/; revision=683 --- diff --git a/ChangeLog b/ChangeLog index a177bd9..9bf9270 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ * src/echangelog/echangelog: Fix bug 284657, thanks to Andrew Gaffney . Cleanup VCS detection. Cleanup. + Make --strict default, add --no-strict option. 2009-09-09: Christian Ruppert * src/imlate/imlate: Bump to 0.0.4. diff --git a/src/echangelog/echangelog b/src/echangelog/echangelog index af4ad8b..8c6aa76 100755 --- a/src/echangelog/echangelog +++ b/src/echangelog/echangelog @@ -23,11 +23,13 @@ $Text::Wrap::unexpand = 0; # Global variables my (@files, @ebuilds, @conflicts, @trivial, @unknown, @new_versions, %actions); my ($input, $editor, $entry, $user, $date, $text, $vcs); -my ($opt_help, $opt_strict, $opt_version); +my ($opt_help, $opt_nostrict, $opt_version); $opt_help = 0; -$opt_strict = 0; +$opt_nostrict = 0; $opt_version = 0; +# DEPRECATED +my $opt_strict = 0; my %vcs = ( bzr => { @@ -78,7 +80,7 @@ sub usage { Options: --help err, this screen ... - --strict abort on trivial/no changes + --no-strict do not abort on trivial/no changes --version show version info EOF print $usage; @@ -184,13 +186,19 @@ sub mypush(\@@) { GetOptions( 'help' => \$opt_help, - 'strict' => \$opt_strict, + 'no-strict' => \$opt_nostrict, 'version' => \$opt_version, + 'strict' => \$opt_strict, ); usage() if $opt_help; version() if $opt_version; +if($opt_strict) { + print STDERR "Warning: The option '--strict' has been deprecated and will be removed soon!\n"; + print STDERR "--strict behaviour is now default.\n"; +} + # Figure out what kind of repo we are in. # Respect $PATH while looking for the VCS if (getenv("PATH")) { @@ -585,9 +593,10 @@ unless (@files) { print STDERR "** modified. Did you forget to $vcs add?\n"; print STDERR "**\n"; - if ($opt_strict) { + if (!$opt_nostrict) { print STDERR "** In strict mode, exiting\n"; - exit 1; + print STDERR "** If you know what you're doing there pass '--no-strict' to echangelog\n"; + exit(1); } @files = sort sortfunc @trivial;