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

In Mercurial (maybe in other VCS too, I have not testing), releasing
and tagging causes redundant log entries:

changeset:   8:10f3abb9601e
tag:         tip
user:        François-Denis Gonthier <[EMAIL PROTECTED]>
date:        Mon Mar 10 14:59:39 2008 -0400
summary:     tagging version debian-2.4.4-4

changeset:   7:d0c559110c6d
tag:         debian-2.4.4-4
parent:      1:894f7eefbe46
user:        François-Denis Gonthier <[EMAIL PROTECTED]>
date:        Mon Mar 10 14:59:39 2008 -0400
summary:     releasing version 2.4.4-4

That is caused by debcommit overriding the commit message with the
"releasing version [...]" message even if there are some new content
in the debian changelog.

I would obviously prefer this kind of log entry:

changeset:   8:3afeab7781b2
tag:         tip
user:        François-Denis Gonthier <[EMAIL PROTECTED]>
date:        Mon Mar 10 15:04:38 2008 -0400
summary:     tagging version debian-2.4.4-4

changeset:   7:10286bcae9db
tag:         debian-2.4.4-4
parent:      1:894f7eefbe46
user:        François-Denis Gonthier <[EMAIL PROTECTED]>
date:        Mon Mar 10 15:04:38 2008 -0400
summary:     * Blarg.

This problem can be worked around by calling debcommit without -r and
then debcommit with -r, but I still believe the behavior of having
redundant log entries is wrong.

I have provided a small and probably incomplete patch to illustrate
what I feel is a more acceptable behavior.

-- Package-specific info:
--- /etc/devscripts.conf ---
--- ~/.devscripts ---
DEBSIGN_KEYID=C181A636
DEBUILD_ROOTCMD=fakeroot

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

Kernel: Linux 2.6.23.9systemtap-moka0 (PREEMPT)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages devscripts depends on:
ii  debianutils                   2.28.4     Miscellaneous utilities specific t
ii  dpkg-dev                      1.14.16.6  package building tools for Debian
ii  libc6                         2.7-9      GNU C Library: Shared libraries
ii  perl                          5.8.8-12   Larry Wall's Practical Extraction 
ii  sed                           4.1.5-6    The GNU sed stream editor

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

-- no debconf information
Index: scripts/debcommit.pl
===================================================================
--- scripts/debcommit.pl        (revision 1118)
+++ scripts/debcommit.pl        (working copy)
@@ -173,6 +173,7 @@
 }
 
 my $release=0;
+my $release_message = 0;
 my $message;
 my $noact=0;
 my $diffmode=0;
@@ -238,6 +239,7 @@
 Getopt::Long::Configure("bundling");
 if (! GetOptions(
                 "r|release" => \$release,
+                 "R|release" => \$release_message,
                 "m|message=s" => \$message,
                 "n|noact" => \$noact,
                 "d|diff" => \$diffmode,
@@ -263,7 +265,7 @@
     die "debcommit: cannot find $changelog\n";
 }
 
-if ($release) {
+if ($release || $release_message) {
     open (C, "<$changelog" ) || die "debcommit: cannot read $changelog: $!";
     my $top=<C>;
     if ($top=~/UNRELEASED/) {
@@ -274,7 +276,14 @@
     my $version=`dpkg-parsechangelog | grep '^Version:' | cut -f 2 -d ' '`;
     chomp $version;
 
-    $message="releasing version $version" if ! defined $message;
+    # Use the message from the changelog.
+    if ($release_message && !defined($message)) {
+      $message = getmessage();
+    }
+    # Use the default release message.
+    elsif (!defined($message)) {
+      $message = "releasing version $version";
+    }
     commit($message);
     tag($version);
 }

Reply via email to