[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Quilt-dev] [PATCH 2/3] edit: Use command "remove" to remove files
From: |
Jean Delvare |
Subject: |
[Quilt-dev] [PATCH 2/3] edit: Use command "remove" to remove files |
Date: |
Wed, 11 Feb 2015 09:08:23 +0100 |
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(-)
--- quilt.orig/quilt/edit.in 2015-02-11 08:55:43.309569186 +0100
+++ quilt/quilt/edit.in 2015-02-11 08:59:09.842641482 +0100
@@ -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
--- quilt.orig/test/edit.test 2015-02-11 08:56:07.967192289 +0100
+++ quilt/test/edit.test 2015-02-11 08:59:09.842641482 +0100
@@ -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
--
Jean Delvare
SUSE L3 Support