quilt-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Quilt-dev] quilt refresh after quilt edit?


From: Solofo . Ramangalahy
Subject: [Quilt-dev] quilt refresh after quilt edit?
Date: Mon, 26 May 2008 13:43:15 +0200

Hi,

I have been caught by forgetting a "quilt refresh" after a "quilt
edit": later, the patches sent by "quilt mail" had wrong intermediate
code.

In which case is a "quilt refresh" *not* desirable after a "quilt edit"?
Anything wrong with making an option to "edit" that does the refresh?

-- 
solofo

This adds an option (--refresh) to issue a refresh after leaving the
editor.

The aim is to prevent forgetting "refresh" after having used "edit".

A way to reduce typing is to use QUILT_EDIT_ARGS="--refresh" in the
quiltrc.

---
 quilt/edit.in |   15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

Index: quilt-0.46/quilt/edit.in
===================================================================
--- quilt-0.46.orig/quilt/edit.in
+++ quilt-0.46/quilt/edit.in
@@ -21,12 +21,15 @@ fi
 
 usage()
 {
-       printf $"Usage: quilt edit file ...\n"
+       printf $"Usage: quilt edit [--refresh] file ...\n"
        if [ x$1 = x-h ]
        then
                printf $"
 Edit the specified file(s) in \$EDITOR (%s) after adding it (them) to
 the topmost patch.
+
+--refresh
+        refresh the patches after leaving the editor.
 " "$EDITOR"
                exit 0
        else
@@ -34,7 +37,7 @@ the topmost patch.
        fi
 }
 
-options=`getopt -o h -- "$@"`
+options=`getopt -o h --long refresh -- "$@"`
 
 if [ $? -ne 0 ]
 then
@@ -48,6 +51,9 @@ do
        case "$1" in
        -h)
                usage -h ;;
+       --refresh)
+               opt_refresh=1
+               shift ;;
        --)
                shift
                break ;;
@@ -76,6 +82,11 @@ do
        fi
 done
 
+if [ -n "$opt_refresh" ]
+then
+    quilt_command refresh
+fi
+
 exit $status
 ### Local Variables:
 ### mode: shell-script




reply via email to

[Prev in Thread] Current Thread [Next in Thread]