quilt-dev
[Top][All Lists]
Advanced

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

[Quilt-dev] [PATCH] quilt pop: Fix timestamp comparisons


From: Jean Delvare
Subject: [Quilt-dev] [PATCH] quilt pop: Fix timestamp comparisons
Date: Thu, 22 Nov 2012 18:31:40 +0100

The timestamps recorded on file systems have a limited resolution.
For this reason, a patch or file with a timestamp exactly equal to
.timestamp should be considered as more recent than .timestamp, i.e.
potentially modified since the last push or refresh. This is
particularly important for the test suite, as we can do many actions
in the same second there.
---
 quilt/pop.in |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/quilt/pop.in
+++ b/quilt/pop.in
@@ -70,14 +70,14 @@ files_may_have_changed()
 
        if [ $? -ne 0 -o ! -e "$patch_file" \
             -o ! -e "$QUILT_PC/$patch/.timestamp" \
-            -o "$QUILT_PC/$patch/.timestamp" -ot "$patch_file" ]
+            -o ! "$QUILT_PC/$patch/.timestamp" -nt "$patch_file" ]
        then
                return 0
        fi
 
        for file in $(files_in_patch $patch)
        do
-               [ "$QUILT_PC/$patch/.timestamp" -ot $file ] && return 0
+               [ ! "$QUILT_PC/$patch/.timestamp" -nt $file ] && return 0
        done
        return 1
 }

-- 
Jean Delvare
Suse L3




reply via email to

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