tests/test-inotify-issue1208
author Patrick Mezard <pmezard@gmail.com>
Fri, 01 Jan 2010 19:53:05 +0100
branchstable
changeset 10186 296a0b14a686
parent 6997 9c4e488f105e
permissions -rwxr-xr-x
mq: preserve --git flag when folding patches Without this, folding a git patch into a regular one downgrades the resulting patch to a regular patch.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6996
fecf060f32a1 inotify: deactivate inotify status on failure
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     1
#!/bin/sh
fecf060f32a1 inotify: deactivate inotify status on failure
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     2
fecf060f32a1 inotify: deactivate inotify status on failure
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     3
"$TESTDIR/hghave" inotify || exit 80
fecf060f32a1 inotify: deactivate inotify status on failure
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     4
fecf060f32a1 inotify: deactivate inotify status on failure
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     5
echo "[extensions]" >> $HGRCPATH
fecf060f32a1 inotify: deactivate inotify status on failure
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     6
echo "inotify=" >> $HGRCPATH
fecf060f32a1 inotify: deactivate inotify status on failure
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     7
fecf060f32a1 inotify: deactivate inotify status on failure
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     8
p="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
fecf060f32a1 inotify: deactivate inotify status on failure
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
     9
hg init $p
fecf060f32a1 inotify: deactivate inotify status on failure
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    10
cd $p
fecf060f32a1 inotify: deactivate inotify status on failure
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    11
6997
9c4e488f105e inotify: workaround ENAMETOOLONG by using symlinks
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 6996
diff changeset
    12
echo % fail
9c4e488f105e inotify: workaround ENAMETOOLONG by using symlinks
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 6996
diff changeset
    13
ln -sf doesnotexist .hg/inotify.sock
9c4e488f105e inotify: workaround ENAMETOOLONG by using symlinks
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 6996
diff changeset
    14
hg st
9c4e488f105e inotify: workaround ENAMETOOLONG by using symlinks
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 6996
diff changeset
    15
hg inserve
9c4e488f105e inotify: workaround ENAMETOOLONG by using symlinks
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 6996
diff changeset
    16
rm .hg/inotify.sock
9c4e488f105e inotify: workaround ENAMETOOLONG by using symlinks
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 6996
diff changeset
    17
6996
fecf060f32a1 inotify: deactivate inotify status on failure
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    18
echo % inserve
6997
9c4e488f105e inotify: workaround ENAMETOOLONG by using symlinks
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 6996
diff changeset
    19
hg inserve -d --pid-file=hg.pid
9c4e488f105e inotify: workaround ENAMETOOLONG by using symlinks
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 6996
diff changeset
    20
cat hg.pid >> "$DAEMON_PIDS"
6996
fecf060f32a1 inotify: deactivate inotify status on failure
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    21
echo % status
fecf060f32a1 inotify: deactivate inotify status on failure
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    22
hg status
6997
9c4e488f105e inotify: workaround ENAMETOOLONG by using symlinks
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 6996
diff changeset
    23
9c4e488f105e inotify: workaround ENAMETOOLONG by using symlinks
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 6996
diff changeset
    24
kill `cat hg.pid`