[darcs-users] strange timestamp in test directory

Peter Maxwell peter.maxwell at anu.edu.au
Tue Jun 22 01:58:08 UTC 2004


Patched files in the temporary test directory created by "darcs apply 
--test" get their mtime set to -1 on at least some systems.  Most of 
the time that isn't a problem (eg: bash just says they date from 1 Jan 
1970), but if the file is a Python module it becomes a critical error 
(see python bug #976608 at sourceforge).  This makes my tests fail.

Clues:
  1) "darcs apply --test" has this problem, but "darcs apply --no-test 
&& darcs check --test" doesn't.
  2) It didn't do that a week ago when I was using (I think) darcs 
0.9.19.
  3) It occurs with both current darcs and darcs 0.9.20 on debian linux.
  4) It doesn't occur on a mac with darcs 0.9.21.

The script I've been using to test for this behaviour is appended.  
Just look for "5 Jan  1  1970 afile.txt" in the output.

  -- Peter Maxwell


#!/bin/sh
ORIG=`pwd`
T=`mktemp -d -t darcstestXXXXX`
darcs --version
echo $T
set -e

cd $T
mkdir repo2
cd repo2
darcs init
darcs setpref test "pwd && ls -l"

cd $T
mkdir repo1
cd repo1
darcs init
echo text > afile.txt
darcs add afile.txt
darcs record --all --no-test --patch-name init
darcs send --dont-sign --output init.patch --all ../repo2

cd $T
cd repo2
darcs apply --test --leave-test-directory < ../repo1/init.patch

cd $ORIG
rm -r $T





More information about the darcs-users mailing list