[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Quilt-dev] address@hidden: Bug#303738: quilt: Put diffstat behind a ---
From: |
Martin Quinson |
Subject: |
[Quilt-dev] address@hidden: Bug#303738: quilt: Put diffstat behind a --- separator] |
Date: |
Sat, 9 Apr 2005 12:06:34 +0200 |
User-agent: |
Mutt/1.5.6+20040907i |
Hello,
I got this from the debian BTS. I feel that this patch is wrong, but since I
don't really understand the awk part, I'm not sure.
What's your advice about it?
Mt.
----- Forwarded message from Martin Waitz <address@hidden> -----
Subject: Bug#303738: quilt: Put diffstat behind a --- separator
X-Debian-PR-Package: quilt
From: Martin Waitz <address@hidden>
To: Debian Bug Tracking System <address@hidden>
X-Mailer: reportbug 3.8
Date: Fri, 08 Apr 2005 15:40:49 +0200
Package: quilt
Version: 0.39-2
Severity: wishlist
Tags: patch
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
hoi :)
I like to put the diffstat behind a --- separator as it really
does not belong to the description of the patch.
This is also the preferred format used on LKML.
something like the thing below:
- --- /usr/share/quilt/refresh.orig 2005-04-08 14:57:57.984032822 +0200
+++ /usr/share/quilt/refresh 2005-04-08 15:20:33.290933467 +0200
@@ -207,38 +207,13 @@
tmp_result=$(gen_tempfile) || die 1
+cat $tmp_header > $tmp_result
+
if [ -n "$opt_diffstat" ]
then
- - diffstat="$(diffstat -p$opt_strip_level $tmp_patch)" || die 1
- - /usr/bin/gawk '
- - function print_diffstat(arr, i) {
- - split(diffstat, arr, "\n")
- - for (i=1; i in arr; i++)
- - print prefix arr[i]
- - }
- - BEGIN { split(diffstat, ds_arr, /\n/) }
- - { prefix=""
- - if (index($0, "#") == 1)
- - prefix="#"
- - }
- - /.*\|.*/ { eat = eat $0 "\n"
- - next }
- - /.* files? changed(, .* insertions?\(\+\))?(, .* deletions?\(-\))?/
\
- - { print_diffstat()
- - diffstat = "" ; eat = ""
- - next }
- - { print eat $0
- - eat = "" }
- - END { printf "%s", eat
- - if (diffstat != "") {
- - print_diffstat()
- - print prefix
- - }
- - }
- - ' diffstat="$diffstat" \
- - $tmp_header > $tmp_result
- -else
- - cat $tmp_header > $tmp_result
+ echo "---" >> $tmp_result
+ diffstat -p$opt_strip_level $tmp_patch >> $tmp_result
+ echo >> $tmp_result
fi
cat $tmp_patch >> $tmp_result
- -- System Information:
Debian Release: 3.1
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.9-uml-faumachine
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=UTF-8) (ignored: LC_ALL set to
de_DE.UTF-8)
Versions of packages quilt depends on:
ii bzip2 1.0.2-5 high-quality block-sorting file co
ii diffstat 1.38-1 produces graph of changes introduc
ii gawk 1:3.1.4-2 GNU awk, a pattern scanning and pr
ii gettext 0.14.1-10 GNU Internationalization utilities
ii libc6 2.3.2.ds1-20 GNU C Library: Shared libraries an
ii patch 2.5.9-2 Apply a diff file to an original
- -- no debconf information
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
iD8DBQFCVongj/Eaxd/oD7IRAjQFAJ9Xb8TdDxd7V6xXY2qJnQn7tKFWpQCfWoKR
Kj+3Rgs74MUSCJjTikvEBCw=
=KsxR
-----END PGP SIGNATURE-----
----- End forwarded message -----
signature.asc
Description: Digital signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Quilt-dev] address@hidden: Bug#303738: quilt: Put diffstat behind a --- separator],
Martin Quinson <=