The following commit has been merged in the master branch:
commit 1041acee899779ea79765c600c320a4d270b1ab3
Author: James McCoy <[email protected]>
Date:   Sun Apr 15 11:03:22 2012 -0400

    mergechanges: Handle continuation lines correctly.
    
    Closes: #656415
    Signed-off-by: James McCoy <[email protected]>

diff --git a/debian/changelog b/debian/changelog
index e8262c9..02d17f9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,8 @@ devscripts (2.11.7) UNRELEASED; urgency=low
   * bts: Generate a proper Cc field with "reassign … . done …".  (Closes:
     #668132)
   * debchange: Remove EOLed releases Lenny and Maverick.
+  * mergechanges: Handle continuation lines correctly.  Thanks to Ben
+    Hutchings for the patch.  (Closes: #656415)
 
  -- James McCoy <[email protected]>  Mon, 09 Apr 2012 19:27:24 -0400
 
diff --git a/scripts/mergechanges.sh b/scripts/mergechanges.sh
index 36407e1..37d4796 100755
--- a/scripts/mergechanges.sh
+++ b/scripts/mergechanges.sh
@@ -190,9 +190,9 @@ fi
 
 # Replace the Architecture: field, nuke the value of Checksums-*: and Files:,
 # and insert the Description: field before the Changes: field
-eval "awk -- '/^[^ ]/{ field=\"\" }
+eval "awk -- '/^[^ ]/{ deleting=0 }
     /^ /{
-        if (length(field) != 0) {
+        if (!deleting) {
             print
         }
         next
@@ -207,7 +207,7 @@ eval "awk -- '/^[^ ]/{ field=\"\" }
         next
     }
     /^Format: /{ printf \"%s ${FORMATS}\\n\", \$1; next}
-    /^(Checksums-.*|Files|Description):/{ next }
+    /^(Checksums-.*|Files|Description):/{ deleting=1; next }
     { print }' \
     ${OUTPUT} ${REDIR1}"
 

-- 
Git repository for devscripts


-- 
To unsubscribe, send mail to [email protected].

Reply via email to