summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Delvare <jdelvare@suse.de>2012-12-03 10:28:50 +0100
committerJean Delvare <jdelvare@suse.de>2012-12-03 10:28:50 +0100
commit005922085f0135c35baa4b0e8db6f05d78586377 (patch)
treeca4c1d4c56f34ad48be3b6fb301168ecfed4f6e9
parentda4841101646d2216269a3750c7b08b0d5b927b0 (diff)
downloadquilt-005922085f0135c35baa4b0e8db6f05d78586377.tar.gz
pop: Fix timestamp comparison
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.
-rw-r--r--quilt.changes5
-rw-r--r--quilt/pop.in4
2 files changed, 7 insertions, 2 deletions
diff --git a/quilt.changes b/quilt.changes
index 5473771..5615d27 100644
--- a/quilt.changes
+++ b/quilt.changes
@@ -1,4 +1,9 @@
-------------------------------------------------------------------
+Mon Dec 3 10:27:46 CET 2012 - jdelvare@suse.de
+
+- pop: Fix timestamp comparison.
+
+-------------------------------------------------------------------
Thu Oct 25 18:04:15 CEST 2012 - jdelvare@suse.de
- Fix typos in japanese translation.
diff --git a/quilt/pop.in b/quilt/pop.in
index efacf09..8dde845 100644
--- 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
}