view tests/test-inotify @ 7350:c5dbe86b0fee

inotify: fix replacing a folder with a file (issue1375)
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Tue, 11 Nov 2008 23:16:59 +0100
parents 6f4a253f2a64
children 5ab0abf27dd9
line wrap: on
line source

#!/bin/sh

"$TESTDIR/hghave" inotify || exit 80

hg init

touch a b c d e
mkdir dir
mkdir dir/bar
touch dir/x dir/y dir/bar/foo

hg ci -Am m

echo "[extensions]" >> $HGRCPATH
echo "inotify=" >> $HGRCPATH
echo "[inotify]" >> $HGRCPATH
echo "debug=1" >> $HGRCPATH
echo "log=/tmp/inot.log" >> $HGRCPATH

echo % inserve
hg inserve -d --pid-file=hg.pid
cat hg.pid >> "$DAEMON_PIDS"

# let the daemon finish its stuff
sleep 1
# issue907
hg status
echo % clean
hg status -c
echo % all
hg status -A

#issue 1375
#Testing that we can remove a folder and then add a file with the same name

mkdir h f g
echo h > h/h
echo f > f/f
echo g > g/g

hg ci -Am t
sleep 1
hg rm h
hg rm f
sleep 1
echo h >h
ln -s g f

hg add h
sleep 1
hg add f

hg status
hg ci -m0
hg status
kill `cat hg.pid`