Show More
@@ -1,114 +1,114 b'' | |||
|
1 | 1 | Check whether size of generaldelta revlog is not bigger than its |
|
2 | 2 | regular equivalent. Test would fail if generaldelta was naive |
|
3 | 3 | implementation of parentdelta: third manifest revision would be fully |
|
4 | 4 | inserted due to big distance from its paren revision (zero). |
|
5 | 5 | |
|
6 | 6 | $ hg init repo |
|
7 | 7 | $ cd repo |
|
8 | 8 | $ echo foo > foo |
|
9 | 9 | $ echo bar > bar |
|
10 | 10 | $ hg commit -q -Am boo |
|
11 | 11 | $ hg clone --pull . ../gdrepo -q --config format.generaldelta=yes |
|
12 | 12 | $ for r in 1 2 3; do |
|
13 | 13 | > echo $r > foo |
|
14 | 14 | > hg commit -q -m $r |
|
15 | 15 | > hg up -q -r 0 |
|
16 | 16 | > hg pull . -q -r $r -R ../gdrepo |
|
17 | 17 | > done |
|
18 | 18 | |
|
19 | 19 | $ cd .. |
|
20 | 20 | >>> import os |
|
21 | 21 | >>> regsize = os.stat("repo/.hg/store/00manifest.i").st_size |
|
22 | 22 | >>> gdsize = os.stat("gdrepo/.hg/store/00manifest.i").st_size |
|
23 | 23 | >>> if regsize < gdsize: |
|
24 | 24 | ... print 'generaldata increased size of manifest' |
|
25 | 25 | |
|
26 | 26 | Verify rev reordering doesnt create invalid bundles (issue4462) |
|
27 | 27 | This requires a commit tree that when pulled will reorder manifest revs such |
|
28 | 28 | that the second manifest to create a file rev will be ordered before the first |
|
29 | 29 | manifest to create that file rev. We also need to do a partial pull to ensure |
|
30 | 30 | reordering happens. At the end we verify the linkrev points at the earliest |
|
31 | 31 | commit. |
|
32 | 32 | |
|
33 | 33 | $ hg init server --config format.generaldelta=True |
|
34 | 34 | $ cd server |
|
35 | 35 | $ touch a |
|
36 | 36 | $ hg commit -Aqm a |
|
37 | 37 | $ echo x > x |
|
38 | 38 | $ echo y > y |
|
39 | 39 | $ hg commit -Aqm xy |
|
40 | 40 | $ hg up -q '.^' |
|
41 | 41 | $ echo x > x |
|
42 | 42 | $ echo z > z |
|
43 | 43 | $ hg commit -Aqm xz |
|
44 | 44 | $ hg up -q 1 |
|
45 | 45 | $ echo b > b |
|
46 | 46 | $ hg commit -Aqm b |
|
47 | 47 | $ hg merge -q 2 |
|
48 | 48 | $ hg commit -Aqm merge |
|
49 | 49 | $ echo c > c |
|
50 | 50 | $ hg commit -Aqm c |
|
51 | 51 | $ hg log -G -T '{rev} {shortest(node)} {desc}' |
|
52 | 52 | @ 5 ebb8 c |
|
53 | 53 | | |
|
54 | 54 | o 4 baf7 merge |
|
55 | 55 | |\ |
|
56 | 56 | | o 3 a129 b |
|
57 | 57 | | | |
|
58 | 58 | o | 2 958c xz |
|
59 | 59 | | | |
|
60 | 60 | | o 1 f00c xy |
|
61 | 61 | |/ |
|
62 | 62 | o 0 3903 a |
|
63 | 63 | |
|
64 | 64 | $ cd .. |
|
65 | $ hg init client | |
|
65 | $ hg init client --config format.generaldelta=false | |
|
66 | 66 | $ cd client |
|
67 | 67 | $ hg pull -q ../server -r 4 |
|
68 | 68 | $ hg debugindex x |
|
69 | 69 | rev offset length base linkrev nodeid p1 p2 |
|
70 | 70 | 0 0 3 0 1 1406e7411862 000000000000 000000000000 |
|
71 | 71 | |
|
72 | 72 | $ cd .. |
|
73 | 73 | |
|
74 | 74 | Test format.aggressivemergedeltas |
|
75 | 75 | |
|
76 | 76 | $ hg init --config format.generaldelta=1 aggressive |
|
77 | 77 | $ cd aggressive |
|
78 | 78 | $ touch a b c d e |
|
79 | 79 | $ hg commit -Aqm side1 |
|
80 | 80 | $ hg up -q null |
|
81 | 81 | $ touch x y |
|
82 | 82 | $ hg commit -Aqm side2 |
|
83 | 83 | |
|
84 | 84 | - Verify non-aggressive merge uses p1 (commit 1) as delta parent |
|
85 | 85 | $ hg merge -q 0 |
|
86 | 86 | $ hg commit -q -m merge |
|
87 | 87 | $ hg debugindex -m |
|
88 | 88 | rev offset length delta linkrev nodeid p1 p2 |
|
89 | 89 | 0 0 59 -1 0 8dde941edb6e 000000000000 000000000000 |
|
90 | 90 | 1 59 59 -1 1 315c023f341d 000000000000 000000000000 |
|
91 | 91 | 2 118 65 1 2 2ab389a983eb 315c023f341d 8dde941edb6e |
|
92 | 92 | |
|
93 | 93 | $ hg strip -q -r . --config extensions.strip= |
|
94 | 94 | |
|
95 | 95 | - Verify aggressive merge uses p2 (commit 0) as delta parent |
|
96 | 96 | $ hg up -q -C 1 |
|
97 | 97 | $ hg merge -q 0 |
|
98 | 98 | $ hg commit -q -m merge --config format.aggressivemergedeltas=True |
|
99 | 99 | $ hg debugindex -m |
|
100 | 100 | rev offset length delta linkrev nodeid p1 p2 |
|
101 | 101 | 0 0 59 -1 0 8dde941edb6e 000000000000 000000000000 |
|
102 | 102 | 1 59 59 -1 1 315c023f341d 000000000000 000000000000 |
|
103 | 103 | 2 118 62 0 2 2ab389a983eb 315c023f341d 8dde941edb6e |
|
104 | 104 | |
|
105 | 105 | Test that strip bundle use bundle2 |
|
106 | 106 | $ hg --config extensions.strip= strip . |
|
107 | 107 | 0 files updated, 0 files merged, 5 files removed, 0 files unresolved |
|
108 | 108 | saved backup bundle to $TESTTMP/aggressive/.hg/strip-backup/1c5d4dc9a8b8-6c68e60c-backup.hg (glob) |
|
109 | 109 | $ hg debugbundle .hg/strip-backup/* |
|
110 | 110 | Stream params: {'Compression': 'BZ'} |
|
111 | 111 | changegroup -- "{'version': '02'}" |
|
112 | 112 | 1c5d4dc9a8b8d6e1750966d343e94db665e7a1e9 |
|
113 | 113 | |
|
114 | 114 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now