Show More
@@ -31,9 +31,11 b' REVLOG_DEFAULT_FLAGS = REVLOGNGINLINEDAT' | |||||
31 | REVLOG_DEFAULT_FORMAT = REVLOGNG |
|
31 | REVLOG_DEFAULT_FORMAT = REVLOGNG | |
32 | REVLOG_DEFAULT_VERSION = REVLOG_DEFAULT_FORMAT | REVLOG_DEFAULT_FLAGS |
|
32 | REVLOG_DEFAULT_VERSION = REVLOG_DEFAULT_FORMAT | REVLOG_DEFAULT_FLAGS | |
33 |
|
33 | |||
|
34 | # amount of data read unconditionally, should be >= 4 | |||
|
35 | # when not inline: threshold for using lazy index | |||
34 | _prereadsize = 1048576 |
|
36 | _prereadsize = 1048576 | |
35 |
|
37 | # max size of revlog with inline data | ||
36 | _maxinline = 131072 # max size of revlog with inline data |
|
38 | _maxinline = 131072 | |
37 |
|
39 | |||
38 | RevlogError = error.RevlogError |
|
40 | RevlogError = error.RevlogError | |
39 | LookupError = error.LookupError |
|
41 | LookupError = error.LookupError |
@@ -22,8 +22,8 b' def reposetup(ui, repo):' | |||||
22 | extensions.wrapfunction(repo, 'commit', wrapcommit) |
|
22 | extensions.wrapfunction(repo, 'commit', wrapcommit) | |
23 |
|
23 | |||
24 | def extsetup(ui): |
|
24 | def extsetup(ui): | |
25 |
revlog._maxinline = |
|
25 | revlog._maxinline = 8 # split out 00changelog.d early | |
26 |
revlog._prereadsize = |
|
26 | revlog._prereadsize = 8 # use revlog.lazyparser | |
27 | EOF |
|
27 | EOF | |
28 |
|
28 | |||
29 | cat >> $HGRCPATH <<EOF |
|
29 | cat >> $HGRCPATH <<EOF | |
@@ -31,20 +31,11 b' cat >> $HGRCPATH <<EOF' | |||||
31 | commitwrapper = $PWD/commitwrapper.py |
|
31 | commitwrapper = $PWD/commitwrapper.py | |
32 | EOF |
|
32 | EOF | |
33 |
|
33 | |||
34 | # use a long username to make sure the changelog is bigger than 128 bytes |
|
|||
35 | export HGUSER='test test test test test test test test test test test' |
|
|||
36 |
|
||||
37 | hg init repo1 |
|
34 | hg init repo1 | |
38 | cd repo1 |
|
35 | cd repo1 | |
39 | echo a > a |
|
36 | echo a > a | |
40 | hg commit -A -m'add a with a long commit message to make the changelog a bit bigger' |
|
37 | hg commit -A -m'add a with a long commit message to make the changelog a bit bigger' | |
41 |
|
38 | |||
42 | # This commit puts 00changelog.i over the 128-byte threshold to split |
|
|||
43 | # out 00changelog.d, which is a precondition for reproducing the bug |
|
|||
44 | # with the next commit. |
|
|||
45 | echo b > b |
|
|||
46 | hg commit -A -m'add b and ramble on a bit here too for the same reason' |
|
|||
47 |
|
||||
48 | echo "" |
|
39 | echo "" | |
49 | echo "% test that new changesets are visible to repo.lookup()" |
|
40 | echo "% test that new changesets are visible to repo.lookup()" | |
50 | echo a >> a |
|
41 | echo a >> a |
@@ -1,14 +1,12 b'' | |||||
1 | % setup |
|
1 | % setup | |
2 | adding a |
|
2 | adding a | |
3 | new tip: 685c8b50a4fa |
|
3 | new tip: 553596fad57b | |
4 | adding b |
|
|||
5 | new tip: 0dc3f194257e |
|
|||
6 |
|
4 | |||
7 | % test that new changesets are visible to repo.lookup() |
|
5 | % test that new changesets are visible to repo.lookup() | |
8 | new tip: 76721648e605 |
|
6 | new tip: 799ae3599e0e | |
9 |
changeset: |
|
7 | changeset: 1:799ae3599e0e | |
10 | tag: tip |
|
8 | tag: tip | |
11 | user: test test test test test test test test test test test |
|
9 | user: test | |
12 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
10 | date: Thu Jan 01 00:00:00 1970 +0000 | |
13 | summary: one more commit to demonstrate the bug |
|
11 | summary: one more commit to demonstrate the bug | |
14 |
|
12 |
General Comments 0
You need to be logged in to leave comments.
Login now