tests/test-schemes
author Nicolas Dumazet <nicdumz.commits@gmail.com>
Fri, 11 Dec 2009 15:58:09 +0900
changeset 10090 a3ad96ead8f0
parent 10070 9d1195b2f00d
child 11154 17031fea4e95
permissions -rwxr-xr-x
inotify: do not rely on stat(.hg/dirstate) to invalidate our dirstate stat() is not reliable when several events happen quickly. Which means that if two hg actions occur in the same second, stat() result will not reflect the second change. And only _one_ invalidate() call was done. Also ignore the events that occur when wlock is held, since wlock release will trigger a full rescan anyway. Fixes 17 run-tests.py --inotify tests.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
9966
1fa9f6850dee schemes extension
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
     1
#!/bin/sh
1fa9f6850dee schemes extension
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
     2
1fa9f6850dee schemes extension
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
     3
cat <<EOF >> $HGRCPATH
1fa9f6850dee schemes extension
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
     4
[extensions]
1fa9f6850dee schemes extension
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
     5
schemes=
1fa9f6850dee schemes extension
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
     6
1fa9f6850dee schemes extension
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
     7
[schemes]
1fa9f6850dee schemes extension
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
     8
l = http://localhost:$HGPORT/
10070
9d1195b2f00d schemes: url parts are counted from 1
Alexander Solovyov <piranha@piranha.org.ua>
parents: 9966
diff changeset
     9
parts = http://{1}:$HGPORT/
9966
1fa9f6850dee schemes extension
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    10
EOF
1fa9f6850dee schemes extension
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    11
1fa9f6850dee schemes extension
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    12
hg init test
1fa9f6850dee schemes extension
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    13
cd test
1fa9f6850dee schemes extension
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    14
echo a > a
1fa9f6850dee schemes extension
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    15
hg ci -Am initial
1fa9f6850dee schemes extension
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    16
1fa9f6850dee schemes extension
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    17
hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
1fa9f6850dee schemes extension
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    18
cat hg.pid >> $DAEMON_PIDS
1fa9f6850dee schemes extension
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    19
1fa9f6850dee schemes extension
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    20
hg incoming l://
1fa9f6850dee schemes extension
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    21
10070
9d1195b2f00d schemes: url parts are counted from 1
Alexander Solovyov <piranha@piranha.org.ua>
parents: 9966
diff changeset
    22
echo % check that {1} syntax works
9d1195b2f00d schemes: url parts are counted from 1
Alexander Solovyov <piranha@piranha.org.ua>
parents: 9966
diff changeset
    23
hg incoming --debug parts://localhost | sed 's/[0-9]//g'
9d1195b2f00d schemes: url parts are counted from 1
Alexander Solovyov <piranha@piranha.org.ua>
parents: 9966
diff changeset
    24
9966
1fa9f6850dee schemes extension
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    25
echo % errors
1fa9f6850dee schemes extension
Alexander Solovyov <piranha@piranha.org.ua>
parents:
diff changeset
    26
cat errors.log