Mercurial > hg
annotate tests/test-inotify-issue1371.t @ 18234:a55b06885cda
branchmap: allow to use cache of subset
Filtered repository are *subset* of unfiltered repository. This means that a
filtered branchmap could be use to compute the unfiltered version.
And filtered version happen to be subset of each other:
- "all() - unserved()" is a subset of "all() - hidden()"
- "all() - hidden()" is a subset of "all()"
This means that branchmap with "unfiltered" filter can be used as a base for
"hidden" branchmap that itself could be used as a base for unfiltered
branchmap.
unserved < hidden < None
This changeset implements this mechanism. If the on disk branchcache is not valid
we use the branchcache of the nearest subset as base instead of computing it from
scratch. Such fallback can be cascaded multiple time is necessary.
Note that both "hidden" and "unserved" set are a bit volatile. We will add more
stable filtering in next changesets.
This changeset enables collaboration between no filtering and "unserved"
filtering. Fixing performance regression introduced by 47f00b0de337
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Mon, 07 Jan 2013 17:23:25 +0100 |
parents | adeb9dad3df6 |
children | f58175f409b0 |
rev | line source |
---|---|
7302
972737252d05
inotify: server raising an error when removing a file (issue1371)
Gerard Korsten <soonkia77@gmail.com>
parents:
diff
changeset
|
1 |
12454
9965b90c7ed7
tests: unify test-inotify-issue1371
Matt Mackall <mpm@selenic.com>
parents:
7351
diff
changeset
|
2 $ "$TESTDIR/hghave" inotify || exit 80 |
17345
4f8054d3171b
check-code: fix check for trailing whitespace on sh command lines
Mads Kiilerich <mads@kiilerich.com>
parents:
12454
diff
changeset
|
3 $ hg init |
12454
9965b90c7ed7
tests: unify test-inotify-issue1371
Matt Mackall <mpm@selenic.com>
parents:
7351
diff
changeset
|
4 $ touch a b c d e f |
9965b90c7ed7
tests: unify test-inotify-issue1371
Matt Mackall <mpm@selenic.com>
parents:
7351
diff
changeset
|
5 $ echo "[extensions]" >> $HGRCPATH |
9965b90c7ed7
tests: unify test-inotify-issue1371
Matt Mackall <mpm@selenic.com>
parents:
7351
diff
changeset
|
6 $ echo "inotify=" >> $HGRCPATH |
7302
972737252d05
inotify: server raising an error when removing a file (issue1371)
Gerard Korsten <soonkia77@gmail.com>
parents:
diff
changeset
|
7 |
12454
9965b90c7ed7
tests: unify test-inotify-issue1371
Matt Mackall <mpm@selenic.com>
parents:
7351
diff
changeset
|
8 inserve |
7302
972737252d05
inotify: server raising an error when removing a file (issue1371)
Gerard Korsten <soonkia77@gmail.com>
parents:
diff
changeset
|
9 |
12454
9965b90c7ed7
tests: unify test-inotify-issue1371
Matt Mackall <mpm@selenic.com>
parents:
7351
diff
changeset
|
10 $ hg inserve -d --pid-file=hg.pid 2>&1 |
9965b90c7ed7
tests: unify test-inotify-issue1371
Matt Mackall <mpm@selenic.com>
parents:
7351
diff
changeset
|
11 $ cat hg.pid >> "$DAEMON_PIDS" |
9965b90c7ed7
tests: unify test-inotify-issue1371
Matt Mackall <mpm@selenic.com>
parents:
7351
diff
changeset
|
12 $ hg ci -Am m |
9965b90c7ed7
tests: unify test-inotify-issue1371
Matt Mackall <mpm@selenic.com>
parents:
7351
diff
changeset
|
13 adding a |
9965b90c7ed7
tests: unify test-inotify-issue1371
Matt Mackall <mpm@selenic.com>
parents:
7351
diff
changeset
|
14 adding b |
9965b90c7ed7
tests: unify test-inotify-issue1371
Matt Mackall <mpm@selenic.com>
parents:
7351
diff
changeset
|
15 adding c |
9965b90c7ed7
tests: unify test-inotify-issue1371
Matt Mackall <mpm@selenic.com>
parents:
7351
diff
changeset
|
16 adding d |
9965b90c7ed7
tests: unify test-inotify-issue1371
Matt Mackall <mpm@selenic.com>
parents:
7351
diff
changeset
|
17 adding e |
9965b90c7ed7
tests: unify test-inotify-issue1371
Matt Mackall <mpm@selenic.com>
parents:
7351
diff
changeset
|
18 adding f |
9965b90c7ed7
tests: unify test-inotify-issue1371
Matt Mackall <mpm@selenic.com>
parents:
7351
diff
changeset
|
19 adding hg.pid |
7302
972737252d05
inotify: server raising an error when removing a file (issue1371)
Gerard Korsten <soonkia77@gmail.com>
parents:
diff
changeset
|
20 |
12454
9965b90c7ed7
tests: unify test-inotify-issue1371
Matt Mackall <mpm@selenic.com>
parents:
7351
diff
changeset
|
21 let the daemon finish its stuff |
7302
972737252d05
inotify: server raising an error when removing a file (issue1371)
Gerard Korsten <soonkia77@gmail.com>
parents:
diff
changeset
|
22 |
12454
9965b90c7ed7
tests: unify test-inotify-issue1371
Matt Mackall <mpm@selenic.com>
parents:
7351
diff
changeset
|
23 $ sleep 1 |
7302
972737252d05
inotify: server raising an error when removing a file (issue1371)
Gerard Korsten <soonkia77@gmail.com>
parents:
diff
changeset
|
24 |
17503 | 25 eed to test all file operations |
7302
972737252d05
inotify: server raising an error when removing a file (issue1371)
Gerard Korsten <soonkia77@gmail.com>
parents:
diff
changeset
|
26 |
12454
9965b90c7ed7
tests: unify test-inotify-issue1371
Matt Mackall <mpm@selenic.com>
parents:
7351
diff
changeset
|
27 $ hg rm a |
9965b90c7ed7
tests: unify test-inotify-issue1371
Matt Mackall <mpm@selenic.com>
parents:
7351
diff
changeset
|
28 $ rm b |
9965b90c7ed7
tests: unify test-inotify-issue1371
Matt Mackall <mpm@selenic.com>
parents:
7351
diff
changeset
|
29 $ echo c >> c |
9965b90c7ed7
tests: unify test-inotify-issue1371
Matt Mackall <mpm@selenic.com>
parents:
7351
diff
changeset
|
30 $ touch g |
9965b90c7ed7
tests: unify test-inotify-issue1371
Matt Mackall <mpm@selenic.com>
parents:
7351
diff
changeset
|
31 $ hg add g |
9965b90c7ed7
tests: unify test-inotify-issue1371
Matt Mackall <mpm@selenic.com>
parents:
7351
diff
changeset
|
32 $ hg mv e h |
9965b90c7ed7
tests: unify test-inotify-issue1371
Matt Mackall <mpm@selenic.com>
parents:
7351
diff
changeset
|
33 $ hg status |
9965b90c7ed7
tests: unify test-inotify-issue1371
Matt Mackall <mpm@selenic.com>
parents:
7351
diff
changeset
|
34 M c |
9965b90c7ed7
tests: unify test-inotify-issue1371
Matt Mackall <mpm@selenic.com>
parents:
7351
diff
changeset
|
35 A g |
9965b90c7ed7
tests: unify test-inotify-issue1371
Matt Mackall <mpm@selenic.com>
parents:
7351
diff
changeset
|
36 A h |
9965b90c7ed7
tests: unify test-inotify-issue1371
Matt Mackall <mpm@selenic.com>
parents:
7351
diff
changeset
|
37 R a |
9965b90c7ed7
tests: unify test-inotify-issue1371
Matt Mackall <mpm@selenic.com>
parents:
7351
diff
changeset
|
38 R e |
9965b90c7ed7
tests: unify test-inotify-issue1371
Matt Mackall <mpm@selenic.com>
parents:
7351
diff
changeset
|
39 ! b |
9965b90c7ed7
tests: unify test-inotify-issue1371
Matt Mackall <mpm@selenic.com>
parents:
7351
diff
changeset
|
40 $ sleep 1 |
7302
972737252d05
inotify: server raising an error when removing a file (issue1371)
Gerard Korsten <soonkia77@gmail.com>
parents:
diff
changeset
|
41 |
12454
9965b90c7ed7
tests: unify test-inotify-issue1371
Matt Mackall <mpm@selenic.com>
parents:
7351
diff
changeset
|
42 Are we able to kill the service? if not, the service died on some error |
7302
972737252d05
inotify: server raising an error when removing a file (issue1371)
Gerard Korsten <soonkia77@gmail.com>
parents:
diff
changeset
|
43 |
17345
4f8054d3171b
check-code: fix check for trailing whitespace on sh command lines
Mads Kiilerich <mads@kiilerich.com>
parents:
12454
diff
changeset
|
44 $ kill `cat hg.pid` |