Mercurial > hg
annotate tests/test-ancestor.py.out @ 34107:4f60720cf0df
blackbox: fix rotation with chg
The added test will show:
$ $PYTHON showsize.py .hg/blackbox*
.hg/blackbox.log: < 500
.hg/blackbox.log.1: < 500
.hg/blackbox.log.2: < 500
.hg/blackbox.log.3: < 500
.hg/blackbox.log.4: < 500
.hg/blackbox.log.5: >= 500
with previous code.
The issue is caused by blackbox caching file objects *by path*, and the
rotation size check could run on a wrong file object (i.e. it should check
"blackbox.log", but `filehandles["blackbox.log"]` contains a file object
that has been renamed to "blackbox.log.5").
This patch removes the "filehandlers" global cache added by 45313f5a3a8c to
solve the issue.
I think the original patch was trying to make different ui objects use a same
file object if their blackbox.log path is the same. In theory it could also
be problematic in the rotation case. Anyway, that should become unnecessary
after D650.
Differential Revision: https://phab.mercurial-scm.org/D648
author | Jun Wu <quark@fb.com> |
---|---|
date | Wed, 06 Sep 2017 19:27:30 -0700 |
parents | 3b1b8f25443e |
children | b6db2e80a9ce |
rev | line source |
---|---|
18091
f7f8159caad3
ancestor: add lazy membership testing to lazyancestors
Siddharth Agarwal <sid0@fb.com>
parents:
18079
diff
changeset
|
1 % lazy ancestor set for [], stoprev = 0, inclusive = False |
23329
c6cd4b8b76f8
test-ancestor: test iteration for lazyancestors
Siddharth Agarwal <sid0@fb.com>
parents:
22355
diff
changeset
|
2 membership: [] |
c6cd4b8b76f8
test-ancestor: test iteration for lazyancestors
Siddharth Agarwal <sid0@fb.com>
parents:
22355
diff
changeset
|
3 iteration: [] |
18091
f7f8159caad3
ancestor: add lazy membership testing to lazyancestors
Siddharth Agarwal <sid0@fb.com>
parents:
18079
diff
changeset
|
4 % lazy ancestor set for [11, 13], stoprev = 0, inclusive = False |
23329
c6cd4b8b76f8
test-ancestor: test iteration for lazyancestors
Siddharth Agarwal <sid0@fb.com>
parents:
22355
diff
changeset
|
5 membership: [7, 8, 3, 4, 1, 0] |
c6cd4b8b76f8
test-ancestor: test iteration for lazyancestors
Siddharth Agarwal <sid0@fb.com>
parents:
22355
diff
changeset
|
6 iteration: [3, 7, 8, 1, 4, 0, 2] |
22355
731b2a90983b
test-ancestor: add a test for `ancestor` with ancestry within the initset
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
18091
diff
changeset
|
7 % lazy ancestor set for [1, 3], stoprev = 0, inclusive = False |
23329
c6cd4b8b76f8
test-ancestor: test iteration for lazyancestors
Siddharth Agarwal <sid0@fb.com>
parents:
22355
diff
changeset
|
8 membership: [1, 0] |
c6cd4b8b76f8
test-ancestor: test iteration for lazyancestors
Siddharth Agarwal <sid0@fb.com>
parents:
22355
diff
changeset
|
9 iteration: [0, 1] |
18091
f7f8159caad3
ancestor: add lazy membership testing to lazyancestors
Siddharth Agarwal <sid0@fb.com>
parents:
18079
diff
changeset
|
10 % lazy ancestor set for [11, 13], stoprev = 0, inclusive = True |
23329
c6cd4b8b76f8
test-ancestor: test iteration for lazyancestors
Siddharth Agarwal <sid0@fb.com>
parents:
22355
diff
changeset
|
11 membership: [11, 13, 7, 8, 3, 4, 1, 0] |
c6cd4b8b76f8
test-ancestor: test iteration for lazyancestors
Siddharth Agarwal <sid0@fb.com>
parents:
22355
diff
changeset
|
12 iteration: [11, 13, 3, 7, 8, 1, 4, 0, 2] |
18091
f7f8159caad3
ancestor: add lazy membership testing to lazyancestors
Siddharth Agarwal <sid0@fb.com>
parents:
18079
diff
changeset
|
13 % lazy ancestor set for [11, 13], stoprev = 6, inclusive = False |
23329
c6cd4b8b76f8
test-ancestor: test iteration for lazyancestors
Siddharth Agarwal <sid0@fb.com>
parents:
22355
diff
changeset
|
14 membership: [7, 8] |
c6cd4b8b76f8
test-ancestor: test iteration for lazyancestors
Siddharth Agarwal <sid0@fb.com>
parents:
22355
diff
changeset
|
15 iteration: [7, 8] |
18091
f7f8159caad3
ancestor: add lazy membership testing to lazyancestors
Siddharth Agarwal <sid0@fb.com>
parents:
18079
diff
changeset
|
16 % lazy ancestor set for [11, 13], stoprev = 6, inclusive = True |
23329
c6cd4b8b76f8
test-ancestor: test iteration for lazyancestors
Siddharth Agarwal <sid0@fb.com>
parents:
22355
diff
changeset
|
17 membership: [11, 13, 7, 8] |
c6cd4b8b76f8
test-ancestor: test iteration for lazyancestors
Siddharth Agarwal <sid0@fb.com>
parents:
22355
diff
changeset
|
18 iteration: [11, 13, 7, 8] |