comparison tests/test-issue2137 @ 10917:bce47e253b61 stable

simplify test-issue2137, make it more portable
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Thu, 15 Apr 2010 15:21:41 +0200
parents b7ca37b90762
children 6bbe4886740e
comparison
equal deleted inserted replaced
10916:9c84395a338e 10917:bce47e253b61
20 return result 20 return result
21 21
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 = 128 # split out 00changelog.d early 25 revlog._maxinline = 8 # split out 00changelog.d early
26 revlog._prereadsize = 128 # use revlog.lazyparser 26 revlog._prereadsize = 8 # use revlog.lazyparser
27 EOF 27 EOF
28 28
29 cat >> $HGRCPATH <<EOF 29 cat >> $HGRCPATH <<EOF
30 [extensions] 30 [extensions]
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
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 38
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
51 hg commit -m'one more commit to demonstrate the bug' 42 hg commit -m'one more commit to demonstrate the bug'