summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@suse.de>2006-01-23 11:01:28 +0000
committerAndreas Gruenbacher <agruen@suse.de>2006-01-23 11:01:28 +0000
commit774b5b35adf93e9e3d665c996e399cdd89b9ed8b (patch)
treef8015bd7fcc0ccc5685bebdc638026b70c70c9f2
parentee1307e582cedbfb02559b7e2862942bb2fe6385 (diff)
downloadquilt-774b5b35adf93e9e3d665c996e399cdd89b9ed8b.tar.gz
- Stop using GNU awk's gensub.
-rw-r--r--po/de.po16
-rw-r--r--po/fr.po16
-rw-r--r--po/ja.po16
-rw-r--r--po/quilt.pot16
-rw-r--r--quilt.changes5
-rw-r--r--quilt/diff.in27
-rw-r--r--quilt/mail.in12
7 files changed, 53 insertions, 55 deletions
diff --git a/po/de.po b/po/de.po
index b09ff4c..bc2dfa2 100644
--- a/po/de.po
+++ b/po/de.po
@@ -305,40 +305,40 @@ msgstr ""
"--sort\tSortiere Dateien im Patch nach ihrem namen, statt die ursprüngliche\n"
"\tReihenfolge zu erhalten.\n"
-#: quilt/diff.in:224
+#: quilt/diff.in:213
msgid ""
"Options \\`--combine', \\`--snapshot', and \\`-z' cannot be combined.\\n"
msgstr ""
"Die Optionen \\`--combine', \\`--snapshot', und \\`-z' können nicht "
"kombiniert werden.\\n"
-#: quilt/diff.in:236
+#: quilt/diff.in:225
msgid "Cannot diff patches with -p%s, please specify -p0 or -p1 instead\\n"
msgstr ""
"Kann kein Diff mit -p$opt_strip_level erzeugen, bitte -p0 oder -p1 verwenden."
"\\n"
-#: quilt/diff.in:271 quilt/files.in:105
+#: quilt/diff.in:260 quilt/files.in:105
msgid "Patch %s not applied before patch %s\\n"
msgstr "Patch %s ist nicht vor Patch %s angewandt\\n"
-#: quilt/diff.in:321 quilt/pop.in:98
+#: quilt/diff.in:310 quilt/pop.in:98
msgid "Failed to copy files to temporary directory\\n"
msgstr "Konnte Dateien nicht in temporäres Verzeichnis kopieren\\n"
-#: quilt/diff.in:345 quilt/pop.in:122
+#: quilt/diff.in:334 quilt/pop.in:122
msgid "Failed to patch temporary files\\n"
msgstr "Konnte temporäre Dateien nicht patchen\\n"
-#: quilt/diff.in:364
+#: quilt/diff.in:353
msgid "File %s is not being modified\\n"
msgstr "Datei %s wird nicht verändert.\\n"
-#: quilt/diff.in:384 quilt/refresh.in:177
+#: quilt/diff.in:373 quilt/refresh.in:177
msgid "Diff failed, aborting\\n"
msgstr "Diff fehlgeschlagen, Abbruch.\\n"
-#: quilt/diff.in:391
+#: quilt/diff.in:380
msgid "Warning: more recent patches modify files in patch %s\\n"
msgstr "Warnung: später angewandte Patches verändern Dateien von %s\\n"
diff --git a/po/fr.po b/po/fr.po
index 57a908a..0b6bf8b 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -309,40 +309,40 @@ msgstr ""
"--sort\tTrie les fichiers par leur nom au lieu de prserver leur ordre\n"
"\td'origine.\n"
-#: quilt/diff.in:224
+#: quilt/diff.in:213
msgid ""
"Options \\`--combine', \\`--snapshot', and \\`-z' cannot be combined.\\n"
msgstr ""
"Les options --combine, --snapshot et -z ne peuvent pas tre combines."
"\\n"
-#: quilt/diff.in:236
+#: quilt/diff.in:225
msgid "Cannot diff patches with -p%s, please specify -p0 or -p1 instead\\n"
msgstr ""
"Impossible de crer des patches avec -p%s. Veuillez spcifier -p0 ou -p1 "
"la place\\n"
-#: quilt/diff.in:271 quilt/files.in:105
+#: quilt/diff.in:260 quilt/files.in:105
msgid "Patch %s not applied before patch %s\\n"
msgstr "Le patch %s n'est pas appliqu avant %s\\n."
-#: quilt/diff.in:321 quilt/pop.in:98
+#: quilt/diff.in:310 quilt/pop.in:98
msgid "Failed to copy files to temporary directory\\n"
msgstr "Impossible de copier les fichiers dans le rpertoire temporaire\\n"
-#: quilt/diff.in:345 quilt/pop.in:122
+#: quilt/diff.in:334 quilt/pop.in:122
msgid "Failed to patch temporary files\\n"
msgstr "Impossible de patcher les fichiers temporaires\\n"
-#: quilt/diff.in:364
+#: quilt/diff.in:353
msgid "File %s is not being modified\\n"
msgstr "Le fichier %s n'est pas modifi.\\n"
-#: quilt/diff.in:384 quilt/refresh.in:177
+#: quilt/diff.in:373 quilt/refresh.in:177
msgid "Diff failed, aborting\\n"
msgstr "Le diff a chou. Abandon.\\n"
-#: quilt/diff.in:391
+#: quilt/diff.in:380
msgid "Warning: more recent patches modify files in patch %s\\n"
msgstr "Attention: un patch plus recent modifie des fichiers communs %s\\n"
diff --git a/po/ja.po b/po/ja.po
index cecd920..d2e344d 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -301,37 +301,37 @@ msgstr ""
"\n"
"--sort\t順番を保持せず、名前順にファイルを並び換える。\n"
-#: quilt/diff.in:224
+#: quilt/diff.in:213
msgid ""
"Options \\`--combine', \\`--snapshot', and \\`-z' cannot be combined.\\n"
msgstr ""
"オプション \\`--combine'と \\`--snapshot'、 \\`-z'は同時に使えません。\\n"
-#: quilt/diff.in:236
+#: quilt/diff.in:225
msgid "Cannot diff patches with -p%s, please specify -p0 or -p1 instead\\n"
msgstr "-p%sでパッチの差分はとれません。-p0か -p1を指定してください\\n"
-#: quilt/diff.in:271 quilt/files.in:105
+#: quilt/diff.in:260 quilt/files.in:105
msgid "Patch %s not applied before patch %s\\n"
msgstr "パッチ %s は、パッチ %s の前に適用されていません\\n"
-#: quilt/diff.in:321 quilt/pop.in:98
+#: quilt/diff.in:310 quilt/pop.in:98
msgid "Failed to copy files to temporary directory\\n"
msgstr "テンポラリディレクトリへのファイルコピーに失敗しました\\n"
-#: quilt/diff.in:345 quilt/pop.in:122
+#: quilt/diff.in:334 quilt/pop.in:122
msgid "Failed to patch temporary files\\n"
msgstr "テンポラリファイルへのパッチ適用に失敗しました\\n"
-#: quilt/diff.in:364
+#: quilt/diff.in:353
msgid "File %s is not being modified\\n"
msgstr "ファイル %s は変更されていません\\n"
-#: quilt/diff.in:384 quilt/refresh.in:177
+#: quilt/diff.in:373 quilt/refresh.in:177
msgid "Diff failed, aborting\\n"
msgstr "差分に失敗しました。異常終了します\\n"
-#: quilt/diff.in:391
+#: quilt/diff.in:380
msgid "Warning: more recent patches modify files in patch %s\\n"
msgstr "警告: 最近のパッチが、パッチ %s 内のファイルを変更しています\\n"
diff --git a/po/quilt.pot b/po/quilt.pot
index de38a19..d94154f 100644
--- a/po/quilt.pot
+++ b/po/quilt.pot
@@ -199,36 +199,36 @@ msgid ""
"--sort\tSort files by their name instead of preserving the original order.\n"
msgstr ""
-#: quilt/diff.in:224
+#: quilt/diff.in:213
msgid ""
"Options \\`--combine', \\`--snapshot', and \\`-z' cannot be combined.\\n"
msgstr ""
-#: quilt/diff.in:236
+#: quilt/diff.in:225
msgid "Cannot diff patches with -p%s, please specify -p0 or -p1 instead\\n"
msgstr ""
-#: quilt/diff.in:271 quilt/files.in:105
+#: quilt/diff.in:260 quilt/files.in:105
msgid "Patch %s not applied before patch %s\\n"
msgstr ""
-#: quilt/diff.in:321 quilt/pop.in:98
+#: quilt/diff.in:310 quilt/pop.in:98
msgid "Failed to copy files to temporary directory\\n"
msgstr ""
-#: quilt/diff.in:345 quilt/pop.in:122
+#: quilt/diff.in:334 quilt/pop.in:122
msgid "Failed to patch temporary files\\n"
msgstr ""
-#: quilt/diff.in:364
+#: quilt/diff.in:353
msgid "File %s is not being modified\\n"
msgstr ""
-#: quilt/diff.in:384 quilt/refresh.in:177
+#: quilt/diff.in:373 quilt/refresh.in:177
msgid "Diff failed, aborting\\n"
msgstr ""
-#: quilt/diff.in:391
+#: quilt/diff.in:380
msgid "Warning: more recent patches modify files in patch %s\\n"
msgstr ""
diff --git a/quilt.changes b/quilt.changes
index 54590f2..2152879 100644
--- a/quilt.changes
+++ b/quilt.changes
@@ -1,4 +1,9 @@
-------------------------------------------------------------------
+Mon Jan 23 11:58:20 CET 2006 - agruen@suse.de
+
+- Stop using GNU awk's gensub.
+
+-------------------------------------------------------------------
Mon Jan 23 10:52:25 CET 2006 - jayvdb@gmail.com
- A better rule for test/.depend.
diff --git a/quilt/diff.in b/quilt/diff.in
index ebdb7a0..a80cc85 100644
--- a/quilt/diff.in
+++ b/quilt/diff.in
@@ -77,25 +77,14 @@ included.
colorize() {
if [ -n "$opt_color" ]; then
- awk '
- { if (/^(Index:|\-\-\-|\+\+\+|\*\*\*) /)
- print "'$color_diff_hdr'" $0 "'$color_clear'"
- else if (/^\+/)
- print "'$color_diff_add'" $0 "'$color_clear'"
- else if (/^-/)
- print "'$color_diff_rem'" $0 "'$color_clear'"
- else if (/^!/)
- print "'$color_diff_mod'" $0 "'$color_clear'"
- else if (/^@@ \-[0-9]+(,[0-9]+)? \+[0-9]+(,[0-9]+)? @@/)
- print gensub(/^(@@[^@]*@@)([ \t]*)(.*)/,
- "'$color_diff_hunk'" "\\1" "'$color_clear'" \
- "\\2" \
- "'$color_diff_ctx'" "\\3" "'$color_clear'", "")
- else if (/^\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*/)
- print "'$color_diff_cctx'" $0 "'$color_clear'"
- else
- print
- }'
+ sed -e '
+ s/^\(Index:\|---\|+++\|\*\*\*\) .*/'$color_diff_hdr'&'$color_clear'/
+ t ; s/^+.*/'$color_diff_add'&'$color_clear'/
+ t ; s/^-.*/'$color_diff_rem'&'$color_clear'/
+ t ; s/^!.*/'$color_diff_mod'&'$color_clear'/
+ t ; s/^\(@@ \-[0-9]\+\(,[0-9]\+\)\? +[0-9]\+\(,[0-9]\+\)\? @@\)\([ \t]*\)\(.*\)/'$color_diff_hunk'\1'$color_clear'\4'$color_diff_ctx'\5'$color_clear'/
+ t ; s/^\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*.*/'$color_diff_cctx'&'$color_clear'/
+ '
else
cat
fi
diff --git a/quilt/mail.in b/quilt/mail.in
index fe44a4c..f6364bd 100644
--- a/quilt/mail.in
+++ b/quilt/mail.in
@@ -235,13 +235,17 @@ for patch in "$@"; do
cat_file $(patch_file_name $patch) \
| quilt_mail_patch_filter $patch > $body
modify="$(awk '
- sub(/^Recipient-/, "") { r = gensub(/:.*/, "", "g")
- s = gensub(/^[^:]*:[ \t]*/, "", "g")
+ sub(/^Recipient-/, "") { r = $0
+ sub(/:.*/, "", r)
+ s = $0
+ sub(/^[^:]*:[ \t]*/, "", s)
gsub(/'\''/, "'\'\''", s)
print "--add-recipient " r "='\''" s "'\''"
}
- sub(/^Replace-/, "") { r = gensub(/:.*/, "", "g")
- s = gensub(/^[^:]*:[ \t]*/, "", "g")
+ sub(/^Replace-/, "") { r = $0
+ sub(/:.*/, "", r)
+ s = $0
+ sub(/^[^:]*:[ \t]*/, s)
gsub(/'\''/, "'\'\''", s)
print "--replace-header " r "='\''" s "'\''"
}