forked from pool/quilt
6c57f63fdf
- translation-fixes-01.patch: Make gettext happy (needed so that following patches apply cleanly.) - translation-fixes-02.patch: Missing escape in Japanese translation. - translation-fixes-03.patch: Improve the German translation (including a number of important fixes.) - translation-fixes-04.patch: Fix translation of main usage message (all languages.) Fixes to the "edit" command: - edit-01-test-file-creation.patch: edit: Improve the test case (needed so that following patches apply cleanly.) - edit-02-call-remove-not-revert.patch: edit: Use command "remove" to remove files. - edit-03-fix-corner-case.patch: edit: Fix a corner case. OBS-URL: https://build.opensuse.org/package/show/devel:tools:scm/quilt?expand=0&rev=100
49 lines
1.3 KiB
Diff
49 lines
1.3 KiB
Diff
From: Jean Delvare <jdelvare@suse.de>
|
|
Subject: edit: Use command "remove" to remove files
|
|
Upstream: Submitted (2011-02-11)
|
|
|
|
Commit f1c186ee renamed command "remove" to "revert". Commit bd1dfdab
|
|
changed the semantics of command "revert". Commit 6d2501ac restored
|
|
command "remove". However command "edit" is still calling command
|
|
"revert" to remove files from the patch when it should be using
|
|
command "remove".
|
|
|
|
This case was not covered by the test suite, which is why the bug was
|
|
not spotted earlier.
|
|
---
|
|
quilt/edit.in | 2 +-
|
|
test/edit.test | 11 +++++++++++
|
|
2 files changed, 12 insertions(+), 1 deletion(-)
|
|
|
|
--- a/quilt/edit.in
|
|
+++ b/quilt/edit.in
|
|
@@ -71,7 +71,7 @@ for file in "$@"
|
|
do
|
|
if ! [ -e "$SUBDIR$file" ]
|
|
then
|
|
- quilt_command revert "$file"
|
|
+ quilt_command remove "$file"
|
|
status=1
|
|
fi
|
|
done
|
|
--- a/test/edit.test
|
|
+++ b/test/edit.test
|
|
@@ -37,6 +37,17 @@ $ quilt files
|
|
$ quilt refresh
|
|
> Refreshed patch patches/patch
|
|
|
|
+# Test the behavior if the editor is called on a new file but
|
|
+# does not actually create it
|
|
+$ cat > editor
|
|
+< #! /bin/sh
|
|
+< echo Doing nothing to $1
|
|
+
|
|
+$ quilt edit nofoo
|
|
+> File nofoo added to patch patches/patch
|
|
+> Doing nothing to nofoo
|
|
+> File nofoo removed from patch patches/patch
|
|
+
|
|
# Test the behavior if the editor creates a brand new file
|
|
$ cat > editor
|
|
< #! /bin/sh
|