--- devscripts-2.10.7ubuntu1/debian/changelog 2007-08-14 16:11:38.000000000 +0200 +++ devscripts-2.10.7ubuntu2/debian/changelog 2007-08-16 18:46:37.000000000 +0200 @@ -1,3 +1,11 @@ +devscripts (2.10.7ubuntu2) gutsy; urgency=low + + * debcommit: + - Add options to specify changelog path (Patch taken from debian)(LP: #132928) + - Change short option for --confirm from -c to -C to avoid conflict + + -- Laurent Bigonville Thu, 16 Aug 2007 18:43:39 +0200 + devscripts (2.10.7ubuntu1) gutsy; urgency=low * Merge from Debian unstable. --- devscripts-2.10.7ubuntu1/scripts/debcommit.pl 2007-08-12 03:59:37.000000000 +0200 +++ devscripts-2.10.7ubuntu2/scripts/debcommit.pl 2007-08-16 19:02:58.000000000 +0200 @@ -6,7 +6,7 @@ =head1 SYNOPSIS -B [B<--release>] [B<--message=>I] [B<--noact>] [B<--confirm>] [B<--all> | I] +B [B<--release>] [B<--message=>I] [B<--noact>] [B<--changelog>] [B<--confirm>] [B<--all> | I] =head1 DESCRIPTION @@ -20,6 +20,11 @@ =over 4 +=item B<-c> B<--changelog> + +Specify an alternate location for the changelog. By default debian/changelog is +used. + =item B<-r> B<--release> Commit a release of the package. The version number is determined from @@ -41,7 +46,7 @@ Do not actually do anything, but do print the commands that would be run. -=item B<-c> B<--confirm> +=item B<-C> B<--confirm> Display the generated commit message and ask for confirmation before committing it. @@ -78,10 +83,11 @@ and commit the change to a package\'s repository. Options: + -c --changelog Specify the location of the changelog -r --release Commit a release of the package and create a tag -m --message=text Specify a commit message -n --noact Dry run, no actual commits - -c --confirm Ask for confirmation of the message before commit + -C --confirm Ask for confirmation of the message before commit -a --all Commit all files (default except for git) -h --help This message -v --version Version information @@ -104,31 +110,34 @@ my $noact=0; my $confirm=0; my $all=0; +my $changelog="debian/changelog"; +Getopt::Long::Configure( "bundling" ); if (! GetOptions( - "release" => \$release, - "message=s" => \$message, - "noact" => \$noact, - "confirm" => \$confirm, - "all" => \$all, - "help" => sub { usage(); exit 0; }, - "version" => sub { version(); exit 0; }, + "r|release" => \$release, + "m|message=s" => \$message, + "n|noact" => \$noact, + "C|confirm" => \$confirm, + "a|all" => \$all, + "c|changelog=s" => \$changelog, + "h|help" => sub { usage(); exit 0; }, + "v|version" => sub { version(); exit 0; }, )) { - die "Usage: debcommit [--release] [--message=text] [--noact] [--confirm] [--all | files to commit]\n"; + die "Usage: debcommit [--release] [--message=text] [--noact] [--changelog] [--confirm] [--all | files to commit]\n"; } my @files_to_commit = @ARGV; -push @files_to_commit, 'debian/changelog' if @files_to_commit; +push @files_to_commit, $changelog if @files_to_commit; my $prog=getprog(); -if (! -e "debian/changelog") { - die "debcommit: cannot find debian/changelog\n"; +if (! -e $changelog) { + die "debcommit: cannot find $changelog\n"; } if ($release) { - open (C, "; if ($top=~/UNRELEASED/) { - die "debcommit: debian/changelog says it's UNRELEASED\nTry running dch --release first\n"; + die "debcommit: $changelog says it's UNRELEASED\nTry running dch --release first\n"; } close C; @@ -317,7 +326,7 @@ @diffcmd = ($prog, 'diff'); } - open CHLOG, '-|', @diffcmd, 'debian/changelog' + open CHLOG, '-|', @diffcmd, $changelog or die "debcommit: cannot run $diffcmd[0]: $!\n"; foreach () {