quilt-dev
[Top][All Lists]
Advanced

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

Re: [Quilt-dev] [PATCH] Enhanced decoration for "series -v" command


From: Peter Williams
Subject: Re: [Quilt-dev] [PATCH] Enhanced decoration for "series -v" command
Date: Tue, 14 Jun 2005 20:36:23 +1000
User-agent: Mozilla Thunderbird 1.0.2-1.3.3 (X11/20050513)

Andreas Gruenbacher wrote:
On Tuesday 14 June 2005 03:49, Peter Williams wrote:

Index: quilt/quilt/refresh.in
===================================================================
--- quilt.orig/quilt/refresh.in
+++ quilt/quilt/refresh.in
@@ -281,6 +281,7 @@ if [ -e $patch_file ] && \
    @DIFF@ -q $patch_file $tmp_result > /dev/null
then
       printf $"Patch %s is unchanged\n" "$(print_patch $patch)"
+       touch $QUILT_PC/$patch/.timestamp
       exit 0
fi


This change looks good. Below is an exquivalent, somewhat cleaner version, in CVS now. Thanks for pointing this out.

Index: quilt/refresh.in
===================================================================
RCS file: /cvsroot/quilt/quilt/quilt/refresh.in,v
retrieving revision 1.40
diff -u -r1.40 refresh.in
--- quilt/refresh.in    6 Jun 2005 19:34:28 -0000       1.40
+++ quilt/refresh.in    14 Jun 2005 10:05:53 -0000
@@ -285,14 +285,11 @@
 cat $tmp_patch >> $tmp_result
if [ -e $patch_file ] && \
-    @DIFF@ -q $patch_file $tmp_result > /dev/null
+   @DIFF@ -q $patch_file $tmp_result > /dev/null

I can't see what's changed here?

 then
        printf $"Patch %s is unchanged\n" "$(print_patch $patch)"
-       die 0
-fi
-
-if ( [ -n "$QUILT_BACKUP" -a -e $patch_file ] && \
-     ! cp $patch_file $patch_file~ ) || \
+elif ( [ -n "$QUILT_BACKUP" -a -e $patch_file ] && \
+       ! cp $patch_file $patch_file~ ) || \
    ! cat_to_file $patch_file < $tmp_result
 then
        die 1

This will now emit two messages i.e. both

printf $"Patch %s is unchanged\n" "$(print_patch $patch)"

and

printf $"Refreshed patch %s\n" "$(print_patch $patch)"

will be emitted. The second of these could be placed in an "else" at the end of the modified "if" statement.

Peter
--
Peter Williams                                   address@hidden

"Learning, n. The kind of ignorance distinguishing the studious."
 -- Ambrose Bierce




reply via email to

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