inotify: fix replacing a folder with a file (
issue1375)
#!/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`