tests/test-586
author Nicolas Dumazet <nicdumz.commits@gmail.com>
Fri, 11 Dec 2009 15:58:09 +0900
changeset 10090 a3ad96ead8f0
parent 7564 f1af59451c0c
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:
4535
720ae5085ee3 commit: fix bug where dirstate for removed file is confused
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     1
#!/bin/sh
720ae5085ee3 commit: fix bug where dirstate for removed file is confused
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     2
# a test for issue586
720ae5085ee3 commit: fix bug where dirstate for removed file is confused
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     3
720ae5085ee3 commit: fix bug where dirstate for removed file is confused
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     4
hg init a
720ae5085ee3 commit: fix bug where dirstate for removed file is confused
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     5
cd a
720ae5085ee3 commit: fix bug where dirstate for removed file is confused
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     6
echo a > a
720ae5085ee3 commit: fix bug where dirstate for removed file is confused
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     7
hg ci -Ama
720ae5085ee3 commit: fix bug where dirstate for removed file is confused
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     8
720ae5085ee3 commit: fix bug where dirstate for removed file is confused
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     9
hg init ../b
720ae5085ee3 commit: fix bug where dirstate for removed file is confused
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    10
cd ../b
720ae5085ee3 commit: fix bug where dirstate for removed file is confused
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    11
echo b > b
720ae5085ee3 commit: fix bug where dirstate for removed file is confused
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    12
hg ci -Amb
720ae5085ee3 commit: fix bug where dirstate for removed file is confused
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    13
720ae5085ee3 commit: fix bug where dirstate for removed file is confused
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    14
hg pull -f ../a
720ae5085ee3 commit: fix bug where dirstate for removed file is confused
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    15
hg merge
720ae5085ee3 commit: fix bug where dirstate for removed file is confused
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    16
hg rm -f a
720ae5085ee3 commit: fix bug where dirstate for removed file is confused
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    17
hg ci -Amc
720ae5085ee3 commit: fix bug where dirstate for removed file is confused
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    18
720ae5085ee3 commit: fix bug where dirstate for removed file is confused
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    19
hg st -A
7564
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 4535
diff changeset
    20
cd ..
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 4535
diff changeset
    21
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 4535
diff changeset
    22
# a test for issue 1433, related to issue586
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 4535
diff changeset
    23
echo % create test repos
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 4535
diff changeset
    24
hg init repoa
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 4535
diff changeset
    25
touch repoa/a
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 4535
diff changeset
    26
hg -R repoa ci -Am adda
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 4535
diff changeset
    27
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 4535
diff changeset
    28
hg init repob
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 4535
diff changeset
    29
touch repob/b
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 4535
diff changeset
    30
hg -R repob ci -Am addb
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 4535
diff changeset
    31
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 4535
diff changeset
    32
hg init repoc
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 4535
diff changeset
    33
cd repoc
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 4535
diff changeset
    34
hg pull ../repoa
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 4535
diff changeset
    35
hg update
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 4535
diff changeset
    36
mkdir tst
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 4535
diff changeset
    37
hg mv * tst
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 4535
diff changeset
    38
hg ci -m "import a in tst"
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 4535
diff changeset
    39
hg pull -f ../repob
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 4535
diff changeset
    40
echo % merge both repos
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 4535
diff changeset
    41
hg merge
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 4535
diff changeset
    42
mkdir src
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 4535
diff changeset
    43
echo % move b content
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 4535
diff changeset
    44
hg mv b src
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 4535
diff changeset
    45
hg ci -m "import b in src"
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 4535
diff changeset
    46
hg manifest
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 4535
diff changeset
    47
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 4535
diff changeset
    48
f1af59451c0c localrepo: fix bad manifest delta generation (issue1433)
Patrick Mezard <pmezard@gmail.com>
parents: 4535
diff changeset
    49