Package: devscripts
Version: 2.10.7
Severity: wishlist
Tags: patch

Hi,


 For pkg-telepathy our the package branch root dir is what later becomes the
 debian dir in the build. So instead of the branch root being a empty dir with
 just the debian dir in it, it really is the debian dir.

 This also means that there is only a changelog and no debian/changelog :)..
 dch allows you to specify an alternate changelog location using it's -c
 option. debcommit currently doesn't, but it would be nice to have.

 Attached patch adds the -c,--changelog option to debcommit.

  Sjoerd

-- System Information:
Debian Release: lenny/sid
  APT prefers oldstable
  APT policy: (500, 'oldstable'), (500, 'unstable'), (500, 'testing'), (101, 
'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.22-1-686 (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=nl_NL (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages devscripts depends on:
ii  debianutils                   2.23.1     Miscellaneous utilities specific t
ii  dpkg-dev                      1.14.5     package building tools for Debian
ii  libc6                         2.6.1-1    GNU C Library: Shared libraries
ii  perl                          5.8.8-7    Larry Wall's Practical Extraction 
ii  sed                           4.1.5-2    The GNU sed stream editor

Versions of packages devscripts recommends:
ii  fakeroot                      1.7.1      Gives a fake root environment

-- no debconf information
--- scripts/debcommit.pl        2007-08-04 22:54:20.000000000 +0200
+++ /usr/bin/debcommit  2007-08-12 11:30:55.000000000 +0200
@@ -6,7 +6,7 @@
 
 =head1 SYNOPSIS
 
-B<debcommit> [B<--release>] [B<--message=>I<text>] [B<--noact>] [B<--all> | 
I<files to commit>]
+B<debcommit> [B<--release>] [B<--message=>I<text>] [B<--noact>] 
[B<--changelog>] [B<--all> | I<files to commit>]
 
 =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
@@ -73,6 +78,7 @@
 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
@@ -97,11 +103,13 @@
 my $message;
 my $noact=0;
 my $all=0;
+my $changelog="debian/changelog";
 if (! GetOptions(
                 "release" => \$release,
                 "message=s" => \$message,
                 "noact" => \$noact,
                 "all" => \$all,
+     "changelog=s" => \$changelog,
                 "help" => sub { usage(); exit 0; },
                 "version" => sub { version(); exit 0; },
                 )) {
@@ -109,18 +117,18 @@
 }
 
 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, "<debian/changelog") || die "debcommit: cannot read 
debian/changelog: $!";
+    open (C, "<$changelog" ) || die "debcommit: cannot read $changelog: $!";
     my $top=<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;
     
@@ -309,7 +317,7 @@
            @diffcmd = ($prog, 'diff');
        }
 
-       open CHLOG, '-|', @diffcmd, 'debian/changelog'
+       open CHLOG, '-|', @diffcmd, $changelog
            or die "debcommit: cannot run $diffcmd[0]: $!\n";
 
        foreach (<CHLOG>) {

Reply via email to