Author: adam-guest
Date: 2008-03-20 21:10:23 +0000 (Thu, 20 Mar 2008)
New Revision: 1174

Modified:
   trunk/debian/changelog
   trunk/scripts/debcommit.pl
Log:
debcommit:
  + When creating summary lines for git and hg, ignore any subchanges
    (i.e. lines indented by more than two spaces and starting with *, +
    or -)


Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog      2008-03-19 20:38:03 UTC (rev 1173)
+++ trunk/debian/changelog      2008-03-20 21:10:23 UTC (rev 1174)
@@ -13,12 +13,16 @@
     + Enhance quoted block detection to handle escaped quotes better
     + Enhance "shell script wrapper" detection to catch more ways of
       disguising a non shell script as one
-  * debcommit: Make the change to --release's behaviour introduced in the
-    last upload optional. If -R / --release-use-changelog is used then
-    the changelog will be checked for uncommitted changes when determining
-    the commit message. The default is not to do so and use the message
-    passed with --message (if any) or "releasing version X.Y.Z" as before.
-    (Closes: #471723)
+  * debcommit:
+    + Make the change to --release's behaviour introduced in the last
+      upload optional. If -R / --release-use-changelog is used then
+      the changelog will be checked for uncommitted changes when determining
+      the commit message. The default is not to do so and use the message
+      passed with --message (if any) or "releasing version X.Y.Z" as before.
+      (Closes: #471723)
+    + When creating summary lines for git and hg, ignore any subchanges
+      (i.e. lines indented by more than two spaces and starting with *, +
+      or -)
   * debdiff: Escape package names when normalising path names
     (Closes: #471282)
   * uscan: Correctly handle an explicit upstream-version of 0

Modified: trunk/scripts/debcommit.pl
===================================================================
--- trunk/scripts/debcommit.pl  2008-03-19 20:38:03 UTC (rev 1173)
+++ trunk/scripts/debcommit.pl  2008-03-20 21:10:23 UTC (rev 1174)
@@ -573,9 +573,10 @@
                die "debcommit: unable to determine commit message using 
$prog$info\nTry using the -m flag.\n";
            }
        } else {
-           my $count = () = $ret =~ /^\* /mg;
 
            if ($prog =~ /^(git|hg)$/) {
+               my $count = () = $ret =~ /^\s*[\*\+-] /mg;
+
                if ($count == 1) {
                    # Unfold
                    $ret =~ s/\n\s+/ /mg;
@@ -588,7 +589,7 @@
 
                    $summary = $ret;
                    # Strip off the second and subsequent changes
-                   $summary =~ s/(^\* .*?)^\* .*/$1/ms;
+                   $summary =~ s/(^\* .*?)^\s*[\*\+-] .*/$1/ms;
                    # Unfold
                    $summary =~ s/\n\s+/ /mg;
                    $summary =~ s/^\* // if $prog eq 'git' or $stripmessage;
@@ -598,13 +599,14 @@
                    } else {
                        # Strip off the first change so that we can prepend
                        # the unfolded version
-                       $ret =~ s/^\* .*?(^\* .*)/$1/msg;
+                       $ret =~ s/^\* .*?(^\s*[\*\+-] .*)/$1/msg;
                        $ret = $summary . $ret;
                    }
                }
            }
 
            if ($stripmessage or $prog eq 'git') {
+               my $count = () = $ret =~ /^\* /mg;
                if ($count == 1) {
                    $ret =~ s/^\* //;
                }



-- 
To unsubscribe, send mail to [EMAIL PROTECTED]

Reply via email to