summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@suse.de>2005-07-18 10:18:13 +0000
committerAndreas Gruenbacher <agruen@suse.de>2005-07-18 10:18:13 +0000
commit78a7ca38e25c940f034c1cc95a510bfd31a92f47 (patch)
tree55713a3cf2f56c83593f66b1f3c7d2b06cf0d150
parentfec91df889939ac235f95de38865e40460033616 (diff)
downloadquilt-78a7ca38e25c940f034c1cc95a510bfd31a92f47.tar.gz
- quilt/annotate.in: Fix case where the file is created/deleted
by a patch. - Makefile.in: add uninstall target.
-rw-r--r--Makefile.in15
-rw-r--r--po/Makefile5
-rw-r--r--po/de.po8
-rw-r--r--po/ja.po8
-rw-r--r--quilt.changes7
-rw-r--r--quilt/annotate.in18
-rw-r--r--test/annotate.test29
7 files changed, 77 insertions, 13 deletions
diff --git a/Makefile.in b/Makefile.in
index a7eb688..4089f20 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -232,8 +232,8 @@ install : scripts
@INSTALL@ -m 755 $(QUILT:%=quilt/%) $(BUILD_ROOT)$(QUILT_DIR)/
@INSTALL@ -d $(BUILD_ROOT)$(SCRIPTS_DIR)
- @INSTALL@ -m 755 $(filter-out scripts/patchfns, \
- $(SCRIPTS:%=scripts/%)) \
+ @INSTALL@ -m 755 $(patsubst %,scripts/%, \
+ $(filter-out patchfns,$(SCRIPTS))) \
$(BUILD_ROOT)$(SCRIPTS_DIR)
@INSTALL@ -m 644 scripts/patchfns $(BUILD_ROOT)$(SCRIPTS_DIR)
@@ -257,6 +257,17 @@ install : scripts
@INSTALL@ -m 644 bash_completion $(BUILD_ROOT)$(etcdir)/bash_completion.d/quilt
@INSTALL@ -m 644 quilt.quiltrc $(BUILD_ROOT)$(etcdir)/
+uninstall:
+ rm -rf $(BIN:%=$(BUILD_ROOT)$(bindir)/%) \
+ $(BUILD_ROOT)$(QUILT_DIR) \
+ $(patsubst %,$(BUILD_ROOT)$(mandir)/man1/%, \
+ $(notdir $(MAN1))) \
+ $(BUILD_ROOT)$(etcdir)/bash_completion.d/quilt \
+ $(BUILD_ROOT)$(etcdir)/quilt.quiltrc \
+ $(BUILD_ROOT)$(docdir)/$(PACKAGE)-$(VERSION)/
+ $(MAKE_NLS) -C po uninstall BUILD_ROOT=$(BUILD_ROOT) \
+ LINGUAS="$(LINGUAS)" localedir=$(localedir)
+
clean :
rm -f $(DIRT)
diff --git a/po/Makefile b/po/Makefile
index abbe439..f2e98e3 100644
--- a/po/Makefile
+++ b/po/Makefile
@@ -34,4 +34,9 @@ install: all
$(BUILD_ROOT)$(localedir)/$$lang/LC_MESSAGES/quilt.mo ; \
done
+uninstall:
+ for lang in $(LINGUAS) ; do \
+ rm -f $(BUILD_ROOT)$(localedir)/$$lang/LC_MESSAGES/quilt.mo ; \
+ done
+
.PHONY: install clean all
diff --git a/po/de.po b/po/de.po
index 68e529d..778a0c1 100644
--- a/po/de.po
+++ b/po/de.po
@@ -685,6 +685,7 @@ msgid "Usage: quilt pop [-afRqv] [num|patch]\\n"
msgstr "Verwendung: quilt pop [-afRqv] [num|patch]\\n"
#: ../quilt/pop.in:25
+#, fuzzy
msgid ""
"\n"
"Remove patch(es) from the stack of applied patches. Without options,\n"
@@ -699,8 +700,8 @@ msgid ""
"-f\tForce remove. The state before the patch(es) were applied will\n"
"\tbe restored from backup files.\n"
"\n"
-"-R\tRemove the patch with \\`patch -R' and check if the patch reverts\n"
-"\tall changes properly.\n"
+"-R\tAlways verify if the patch removes cleanly; don't rely on\n"
+"\ttimestamp checks.\n"
"\n"
"-q\tQuiet operation.\n"
"\n"
@@ -771,6 +772,7 @@ msgid "Usage: quilt push [-afqv] [--leave-rejects] [num|patch]\\n"
msgstr "Verwendung: quilt push [-afqv] [--leave-rejects] [num|patch]\\n"
#: ../quilt/push.in:27
+#, fuzzy
msgid ""
"\n"
"Apply patch(es) from the series file. Without options, the next patch\n"
@@ -794,7 +796,7 @@ msgid ""
"\n"
"--interactive\n"
"\tAllow the patch utility to ask how to deal with conflicts. If\n"
-"\tthis option is not given, the option -f will be passed to the \n"
+"\tthis option is not given, the -f option will be passed to the \n"
"\tpatch program.\n"
"\n"
"--color[=always|auto|never]\n"
diff --git a/po/ja.po b/po/ja.po
index f819a61..7eb4192 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -675,6 +675,7 @@ msgid "Usage: quilt pop [-afRqv] [num|patch]\\n"
msgstr "使い方: quilt pop [-afRqv] [数字|パッチ]\\n"
#: ../quilt/pop.in:25
+#, fuzzy
msgid ""
"\n"
"Remove patch(es) from the stack of applied patches. Without options,\n"
@@ -689,8 +690,8 @@ msgid ""
"-f\tForce remove. The state before the patch(es) were applied will\n"
"\tbe restored from backup files.\n"
"\n"
-"-R\tRemove the patch with \\`patch -R' and check if the patch reverts\n"
-"\tall changes properly.\n"
+"-R\tAlways verify if the patch removes cleanly; don't rely on\n"
+"\ttimestamp checks.\n"
"\n"
"-q\tQuiet operation.\n"
"\n"
@@ -762,6 +763,7 @@ msgid "Usage: quilt push [-afqv] [--leave-rejects] [num|patch]\\n"
msgstr "使い方: quilt push [-afqv] [--leave-rejects] [数字|パッチ]\\n"
#: ../quilt/push.in:27
+#, fuzzy
msgid ""
"\n"
"Apply patch(es) from the series file. Without options, the next patch\n"
@@ -785,7 +787,7 @@ msgid ""
"\n"
"--interactive\n"
"\tAllow the patch utility to ask how to deal with conflicts. If\n"
-"\tthis option is not given, the option -f will be passed to the \n"
+"\tthis option is not given, the -f option will be passed to the \n"
"\tpatch program.\n"
"\n"
"--color[=always|auto|never]\n"
diff --git a/quilt.changes b/quilt.changes
index fbf939e..35c2bd3 100644
--- a/quilt.changes
+++ b/quilt.changes
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Mon Jul 18 12:15:35 CEST 2005 - agruen@suse.de
+
+- quilt/annotate.in: Fix case where the file is created/deleted
+ by a patch.
+- Makefile.in: add uninstall target.
+
+-------------------------------------------------------------------
Sun Jul 17 10:05:10 CEST 2005 - agruen@suse.de
- bin/quilt.in: clean up helptext.
diff --git a/quilt/annotate.in b/quilt/annotate.in
index cd9856a..e26bfa2 100644
--- a/quilt/annotate.in
+++ b/quilt/annotate.in
@@ -35,19 +35,24 @@ patches modify which lines.
empty_file()
{
local patch=$1 file=$2
- sed -e 's:.*::' $(backup_file_name $patch $file)
+ local backup_file=$(backup_file_name $patch $file)
+ [ -s "$backup_file" ] \
+ && sed -e 's:.*::' "$backup_file"
}
annotation_for()
{
- local patch=$1 next_patch=$2 file=$3 annotation=$4 new_file
+ local patch=$1 next_patch=$2 file=$3 annotation=$4
+ local old_file=$(backup_file_name $patch "$file") new_file
+ [ -s "$old_file" ] || old_file=/dev/null
if [ -z "$next_patch" ]
then
new_file="$file"
else
new_file="$(backup_file_name $next_patch $file)"
+ [ -s "$new_file" ] || new_file=/dev/null
fi
- @DIFF@ -e "$(backup_file_name $patch "$file")" "$new_file" \
+ @DIFF@ -Ne "$old_file" "$new_file" \
| @PERL@ -e '
while (<>) {
if (/^\d+(?:,\d+)?[ac]$/) {
@@ -67,9 +72,12 @@ annotation_for()
merge_files()
{
local a b saved_IFS="$IFS"
+ local template=$1 file=$2
- exec 3< "$1"
- exec 4< "$2"
+ [ -e "$file" ] || file=/dev/null
+
+ exec 3< "$template"
+ exec 4< "$file"
IFS=
while read -r a <&3
do
diff --git a/test/annotate.test b/test/annotate.test
index 4f6def8..e0906a1 100644
--- a/test/annotate.test
+++ b/test/annotate.test
@@ -59,5 +59,34 @@
> 2 patches/patch2
> 3 patches/patch3
+ $ quilt new patch4
+ > Patch patches/patch4 is now on top
+
+ $ cat > jkl
+ < abc
+ < def
+
+ $ quilt add jkl wrz
+ > File jkl added to patch patches/patch4
+ > File wrz added to patch patches/patch4
+
+ $ rm jkl
+ $ cat > wrz
+ < one
+ < two
+
+ $ quilt refresh
+ > Refreshed patch patches/patch4
+
+ $ quilt annotate jkl
+ >
+ > 1 patches/patch4
+
+ $ quilt annotate wrz
+ > 1 one
+ > 1 two
+ >
+ > 1 patches/patch4
+
$ cd ..
$ rm -rf d