On 28/12/2009, Don Mullis <[email protected]> wrote:
> Modify the functionality of `quilt delete' to exit with an error
>  if it detects unrefreshed changes.
>
>  To access the old functionality, a `quilt delete -f' option is
>  introduced. . . .

Nice. I've got this patch that does pretty much the same thing, but it
also adds the "-R" from "pop" to "delete". Not that I've ever used
that option, but it seemed appropriate to include it because it also
affects how the files are checked for changes. Perhaps you might want
to include some of my changes in your patch.

-Martin
Index: quilt-0.48/quilt/delete.in
===================================================================
--- quilt-0.48.orig/quilt/delete.in     2009-11-16 17:29:32.000000000 +1100
+++ quilt-0.48/quilt/delete.in  2009-11-17 09:35:59.000000000 +1100
@@ -35,6 +35,12 @@ topmost patch can be removed right now.)
 --backup
        Rename the patch file to patch~ rather than deleting it.
        Ignored if not used with \`-r'.
+
+-f     Force remove even if the patch is applied and has unrefreshed
+       changes.
+
+-R     Always verify if the patch is refreshed; don't rely on timestamp
+       checks.
 "
 
                exit 0
@@ -43,7 +49,9 @@ topmost patch can be removed right now.)
        fi
 }
 
-options=`getopt -o nrh --long backup,help -- "$@"`
+unset opt_pop
+
+options=`getopt -o nrhfR --long backup,help -- "$@"`
 
 if [ $? -ne 0 ]
 then
@@ -66,6 +74,9 @@ do
        --backup)
                QUILT_BACKUP=1
                shift ;;
+       -f | -R)
+               opt_pop="${opt_pop+$opt_pop }$1"
+               shift ;;
        --)
                shift
                break ;;
@@ -103,7 +114,7 @@ if is_applied "$patch"; then
                       "$(print_patch "$patch")" >&2
                exit 1
        fi
-       if ! quilt_command pop -fq
+       if ! quilt_command pop -q $opt_pop
        then
                exit 1
        fi
_______________________________________________
Quilt-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/quilt-dev

Reply via email to