##// END OF EJS Templates
tests: skip some tests when using simple store...
Gregory Szorc -
r37361:0611c954 default
parent child Browse files
Show More
@@ -1,356 +1,358 b''
1 #require no-reposimplestore
2
1 3 Check whether size of generaldelta revlog is not bigger than its
2 4 regular equivalent. Test would fail if generaldelta was naive
3 5 implementation of parentdelta: third manifest revision would be fully
4 6 inserted due to big distance from its paren revision (zero).
5 7
6 8 $ hg init repo --config format.generaldelta=no --config format.usegeneraldelta=no
7 9 $ cd repo
8 10 $ echo foo > foo
9 11 $ echo bar > bar
10 12 $ echo baz > baz
11 13 $ hg commit -q -Am boo
12 14 $ hg clone --pull . ../gdrepo -q --config format.generaldelta=yes
13 15 $ for r in 1 2 3; do
14 16 > echo $r > foo
15 17 > hg commit -q -m $r
16 18 > hg up -q -r 0
17 19 > hg pull . -q -r $r -R ../gdrepo
18 20 > done
19 21
20 22 $ cd ..
21 23 >>> from __future__ import print_function
22 24 >>> import os
23 25 >>> regsize = os.stat("repo/.hg/store/00manifest.i").st_size
24 26 >>> gdsize = os.stat("gdrepo/.hg/store/00manifest.i").st_size
25 27 >>> if regsize < gdsize:
26 28 ... print('generaldata increased size of manifest')
27 29
28 30 Verify rev reordering doesnt create invalid bundles (issue4462)
29 31 This requires a commit tree that when pulled will reorder manifest revs such
30 32 that the second manifest to create a file rev will be ordered before the first
31 33 manifest to create that file rev. We also need to do a partial pull to ensure
32 34 reordering happens. At the end we verify the linkrev points at the earliest
33 35 commit.
34 36
35 37 $ hg init server --config format.generaldelta=True
36 38 $ cd server
37 39 $ touch a
38 40 $ hg commit -Aqm a
39 41 $ echo x > x
40 42 $ echo y > y
41 43 $ hg commit -Aqm xy
42 44 $ hg up -q '.^'
43 45 $ echo x > x
44 46 $ echo z > z
45 47 $ hg commit -Aqm xz
46 48 $ hg up -q 1
47 49 $ echo b > b
48 50 $ hg commit -Aqm b
49 51 $ hg merge -q 2
50 52 $ hg commit -Aqm merge
51 53 $ echo c > c
52 54 $ hg commit -Aqm c
53 55 $ hg log -G -T '{rev} {shortest(node)} {desc}'
54 56 @ 5 ebb8 c
55 57 |
56 58 o 4 baf7 merge
57 59 |\
58 60 | o 3 a129 b
59 61 | |
60 62 o | 2 958c xz
61 63 | |
62 64 | o 1 f00c xy
63 65 |/
64 66 o 0 3903 a
65 67
66 68 $ cd ..
67 69 $ hg init client --config format.generaldelta=false --config format.usegeneraldelta=false
68 70 $ cd client
69 71 $ hg pull -q ../server -r 4
70 72 $ hg debugdeltachain x
71 73 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio
72 74 0 1 1 -1 base 3 2 3 1.50000 3 0 0.00000
73 75
74 76 $ cd ..
75 77
76 78 Test "usegeneraldelta" config
77 79 (repo are general delta, but incoming bundle are not re-deltafied)
78 80
79 81 delta coming from the server base delta server are not recompressed.
80 82 (also include the aggressive version for comparison)
81 83
82 84 $ hg clone repo --pull --config format.usegeneraldelta=1 usegd
83 85 requesting all changes
84 86 adding changesets
85 87 adding manifests
86 88 adding file changes
87 89 added 4 changesets with 6 changes to 3 files (+2 heads)
88 90 new changesets 0ea3fcf9d01d:bba78d330d9c
89 91 updating to branch default
90 92 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
91 93 $ hg clone repo --pull --config format.generaldelta=1 full
92 94 requesting all changes
93 95 adding changesets
94 96 adding manifests
95 97 adding file changes
96 98 added 4 changesets with 6 changes to 3 files (+2 heads)
97 99 new changesets 0ea3fcf9d01d:bba78d330d9c
98 100 updating to branch default
99 101 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
100 102 $ hg -R repo debugdeltachain -m
101 103 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio
102 104 0 1 1 -1 base 104 135 104 0.77037 104 0 0.00000
103 105 1 1 2 0 prev 57 135 161 1.19259 161 0 0.00000
104 106 2 1 3 1 prev 57 135 218 1.61481 218 0 0.00000
105 107 3 2 1 -1 base 104 135 104 0.77037 104 0 0.00000
106 108 $ hg -R usegd debugdeltachain -m
107 109 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio
108 110 0 1 1 -1 base 104 135 104 0.77037 104 0 0.00000
109 111 1 1 2 0 p1 57 135 161 1.19259 161 0 0.00000
110 112 2 1 3 1 prev 57 135 218 1.61481 218 0 0.00000
111 113 3 1 2 0 p1 57 135 161 1.19259 275 114 0.70807
112 114 $ hg -R full debugdeltachain -m
113 115 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio
114 116 0 1 1 -1 base 104 135 104 0.77037 104 0 0.00000
115 117 1 1 2 0 p1 57 135 161 1.19259 161 0 0.00000
116 118 2 1 2 0 p1 57 135 161 1.19259 218 57 0.35404
117 119 3 1 2 0 p1 57 135 161 1.19259 275 114 0.70807
118 120
119 121 Test format.aggressivemergedeltas
120 122
121 123 $ hg init --config format.generaldelta=1 aggressive
122 124 $ cd aggressive
123 125 $ cat << EOF >> .hg/hgrc
124 126 > [format]
125 127 > generaldelta = 1
126 128 > EOF
127 129 $ touch a b c d e
128 130 $ hg commit -Aqm side1
129 131 $ hg up -q null
130 132 $ touch x y
131 133 $ hg commit -Aqm side2
132 134
133 135 - Verify non-aggressive merge uses p1 (commit 1) as delta parent
134 136 $ hg merge -q 0
135 137 $ hg commit -q -m merge
136 138 $ hg debugdeltachain -m
137 139 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio
138 140 0 1 1 -1 base 59 215 59 0.27442 59 0 0.00000
139 141 1 1 2 0 prev 61 86 120 1.39535 120 0 0.00000
140 142 2 1 3 1 p1 65 301 185 0.61462 185 0 0.00000
141 143
142 144 $ hg strip -q -r . --config extensions.strip=
143 145
144 146 - Verify aggressive merge uses p2 (commit 0) as delta parent
145 147 $ hg up -q -C 1
146 148 $ hg merge -q 0
147 149 $ hg commit -q -m merge --config format.aggressivemergedeltas=True
148 150 $ hg debugdeltachain -m
149 151 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio
150 152 0 1 1 -1 base 59 215 59 0.27442 59 0 0.00000
151 153 1 1 2 0 prev 61 86 120 1.39535 120 0 0.00000
152 154 2 1 2 0 p2 62 301 121 0.40199 182 61 0.50413
153 155
154 156 Test that strip bundle use bundle2
155 157 $ hg --config extensions.strip= strip .
156 158 0 files updated, 0 files merged, 5 files removed, 0 files unresolved
157 159 saved backup bundle to $TESTTMP/aggressive/.hg/strip-backup/1c5d4dc9a8b8-6c68e60c-backup.hg
158 160 $ hg debugbundle .hg/strip-backup/*
159 161 Stream params: {Compression: BZ}
160 162 changegroup -- {nbchanges: 1, version: 02}
161 163 1c5d4dc9a8b8d6e1750966d343e94db665e7a1e9
162 164 cache:rev-branch-cache -- {}
163 165 phase-heads -- {}
164 166 1c5d4dc9a8b8d6e1750966d343e94db665e7a1e9 draft
165 167
166 168 $ cd ..
167 169
168 170 test maxdeltachainspan
169 171
170 172 $ hg init source-repo
171 173 $ cd source-repo
172 174 $ hg debugbuilddag --new-file '.+5:brancha$.+11:branchb$.+30:branchc<brancha+2<branchb+2'
173 175 $ cd ..
174 176 $ hg -R source-repo debugdeltachain -m
175 177 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio
176 178 0 1 1 -1 base 46 45 46 1.02222 46 0 0.00000
177 179 1 1 2 0 p1 57 90 103 1.14444 103 0 0.00000
178 180 2 1 3 1 p1 57 135 160 1.18519 160 0 0.00000
179 181 3 1 4 2 p1 57 180 217 1.20556 217 0 0.00000
180 182 4 1 5 3 p1 57 225 274 1.21778 274 0 0.00000
181 183 5 1 6 4 p1 57 270 331 1.22593 331 0 0.00000
182 184 6 2 1 -1 base 46 45 46 1.02222 46 0 0.00000
183 185 7 2 2 6 p1 57 90 103 1.14444 103 0 0.00000
184 186 8 2 3 7 p1 57 135 160 1.18519 160 0 0.00000
185 187 9 2 4 8 p1 57 180 217 1.20556 217 0 0.00000
186 188 10 2 5 9 p1 58 226 275 1.21681 275 0 0.00000
187 189 11 2 6 10 p1 58 272 333 1.22426 333 0 0.00000
188 190 12 2 7 11 p1 58 318 391 1.22956 391 0 0.00000
189 191 13 2 8 12 p1 58 364 449 1.23352 449 0 0.00000
190 192 14 2 9 13 p1 58 410 507 1.23659 507 0 0.00000
191 193 15 2 10 14 p1 58 456 565 1.23904 565 0 0.00000
192 194 16 2 11 15 p1 58 502 623 1.24104 623 0 0.00000
193 195 17 2 12 16 p1 58 548 681 1.24270 681 0 0.00000
194 196 18 3 1 -1 base 47 46 47 1.02174 47 0 0.00000
195 197 19 3 2 18 p1 58 92 105 1.14130 105 0 0.00000
196 198 20 3 3 19 p1 58 138 163 1.18116 163 0 0.00000
197 199 21 3 4 20 p1 58 184 221 1.20109 221 0 0.00000
198 200 22 3 5 21 p1 58 230 279 1.21304 279 0 0.00000
199 201 23 3 6 22 p1 58 276 337 1.22101 337 0 0.00000
200 202 24 3 7 23 p1 58 322 395 1.22671 395 0 0.00000
201 203 25 3 8 24 p1 58 368 453 1.23098 453 0 0.00000
202 204 26 3 9 25 p1 58 414 511 1.23430 511 0 0.00000
203 205 27 3 10 26 p1 58 460 569 1.23696 569 0 0.00000
204 206 28 3 11 27 p1 58 506 627 1.23913 627 0 0.00000
205 207 29 3 12 28 p1 58 552 685 1.24094 685 0 0.00000
206 208 30 3 13 29 p1 58 598 743 1.24247 743 0 0.00000
207 209 31 3 14 30 p1 58 644 801 1.24379 801 0 0.00000
208 210 32 3 15 31 p1 58 690 859 1.24493 859 0 0.00000
209 211 33 3 16 32 p1 58 736 917 1.24592 917 0 0.00000
210 212 34 3 17 33 p1 58 782 975 1.24680 975 0 0.00000
211 213 35 3 18 34 p1 58 828 1033 1.24758 1033 0 0.00000
212 214 36 3 19 35 p1 58 874 1091 1.24828 1091 0 0.00000
213 215 37 3 20 36 p1 58 920 1149 1.24891 1149 0 0.00000
214 216 38 3 21 37 p1 58 966 1207 1.24948 1207 0 0.00000
215 217 39 3 22 38 p1 58 1012 1265 1.25000 1265 0 0.00000
216 218 40 3 23 39 p1 58 1058 1323 1.25047 1323 0 0.00000
217 219 41 3 24 40 p1 58 1104 1381 1.25091 1381 0 0.00000
218 220 42 3 25 41 p1 58 1150 1439 1.25130 1439 0 0.00000
219 221 43 3 26 42 p1 58 1196 1497 1.25167 1497 0 0.00000
220 222 44 3 27 43 p1 58 1242 1555 1.25201 1555 0 0.00000
221 223 45 3 28 44 p1 58 1288 1613 1.25233 1613 0 0.00000
222 224 46 3 29 45 p1 58 1334 1671 1.25262 1671 0 0.00000
223 225 47 3 30 46 p1 58 1380 1729 1.25290 1729 0 0.00000
224 226 48 3 31 47 p1 58 1426 1787 1.25316 1787 0 0.00000
225 227 49 4 1 -1 base 197 316 197 0.62342 197 0 0.00000
226 228 50 4 2 49 p1 58 362 255 0.70442 255 0 0.00000
227 229 51 4 3 50 prev 356 594 611 1.02862 611 0 0.00000
228 230 52 4 4 51 p1 58 640 669 1.04531 669 0 0.00000
229 231 $ hg clone --pull source-repo --config experimental.maxdeltachainspan=2800 relax-chain --config format.generaldelta=yes
230 232 requesting all changes
231 233 adding changesets
232 234 adding manifests
233 235 adding file changes
234 236 added 53 changesets with 53 changes to 53 files (+2 heads)
235 237 new changesets 61246295ee1e:99cae3713489
236 238 updating to branch default
237 239 14 files updated, 0 files merged, 0 files removed, 0 files unresolved
238 240 $ hg -R relax-chain debugdeltachain -m
239 241 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio
240 242 0 1 1 -1 base 46 45 46 1.02222 46 0 0.00000
241 243 1 1 2 0 p1 57 90 103 1.14444 103 0 0.00000
242 244 2 1 3 1 p1 57 135 160 1.18519 160 0 0.00000
243 245 3 1 4 2 p1 57 180 217 1.20556 217 0 0.00000
244 246 4 1 5 3 p1 57 225 274 1.21778 274 0 0.00000
245 247 5 1 6 4 p1 57 270 331 1.22593 331 0 0.00000
246 248 6 2 1 -1 base 46 45 46 1.02222 46 0 0.00000
247 249 7 2 2 6 p1 57 90 103 1.14444 103 0 0.00000
248 250 8 2 3 7 p1 57 135 160 1.18519 160 0 0.00000
249 251 9 2 4 8 p1 57 180 217 1.20556 217 0 0.00000
250 252 10 2 5 9 p1 58 226 275 1.21681 275 0 0.00000
251 253 11 2 6 10 p1 58 272 333 1.22426 333 0 0.00000
252 254 12 2 7 11 p1 58 318 391 1.22956 391 0 0.00000
253 255 13 2 8 12 p1 58 364 449 1.23352 449 0 0.00000
254 256 14 2 9 13 p1 58 410 507 1.23659 507 0 0.00000
255 257 15 2 10 14 p1 58 456 565 1.23904 565 0 0.00000
256 258 16 2 11 15 p1 58 502 623 1.24104 623 0 0.00000
257 259 17 2 12 16 p1 58 548 681 1.24270 681 0 0.00000
258 260 18 3 1 -1 base 47 46 47 1.02174 47 0 0.00000
259 261 19 3 2 18 p1 58 92 105 1.14130 105 0 0.00000
260 262 20 3 3 19 p1 58 138 163 1.18116 163 0 0.00000
261 263 21 3 4 20 p1 58 184 221 1.20109 221 0 0.00000
262 264 22 3 5 21 p1 58 230 279 1.21304 279 0 0.00000
263 265 23 3 6 22 p1 58 276 337 1.22101 337 0 0.00000
264 266 24 3 7 23 p1 58 322 395 1.22671 395 0 0.00000
265 267 25 3 8 24 p1 58 368 453 1.23098 453 0 0.00000
266 268 26 3 9 25 p1 58 414 511 1.23430 511 0 0.00000
267 269 27 3 10 26 p1 58 460 569 1.23696 569 0 0.00000
268 270 28 3 11 27 p1 58 506 627 1.23913 627 0 0.00000
269 271 29 3 12 28 p1 58 552 685 1.24094 685 0 0.00000
270 272 30 3 13 29 p1 58 598 743 1.24247 743 0 0.00000
271 273 31 3 14 30 p1 58 644 801 1.24379 801 0 0.00000
272 274 32 3 15 31 p1 58 690 859 1.24493 859 0 0.00000
273 275 33 3 16 32 p1 58 736 917 1.24592 917 0 0.00000
274 276 34 3 17 33 p1 58 782 975 1.24680 975 0 0.00000
275 277 35 3 18 34 p1 58 828 1033 1.24758 1033 0 0.00000
276 278 36 3 19 35 p1 58 874 1091 1.24828 1091 0 0.00000
277 279 37 3 20 36 p1 58 920 1149 1.24891 1149 0 0.00000
278 280 38 3 21 37 p1 58 966 1207 1.24948 1207 0 0.00000
279 281 39 3 22 38 p1 58 1012 1265 1.25000 1265 0 0.00000
280 282 40 3 23 39 p1 58 1058 1323 1.25047 1323 0 0.00000
281 283 41 3 24 40 p1 58 1104 1381 1.25091 1381 0 0.00000
282 284 42 3 25 41 p1 58 1150 1439 1.25130 1439 0 0.00000
283 285 43 3 26 42 p1 58 1196 1497 1.25167 1497 0 0.00000
284 286 44 3 27 43 p1 58 1242 1555 1.25201 1555 0 0.00000
285 287 45 3 28 44 p1 58 1288 1613 1.25233 1613 0 0.00000
286 288 46 3 29 45 p1 58 1334 1671 1.25262 1671 0 0.00000
287 289 47 3 30 46 p1 58 1380 1729 1.25290 1729 0 0.00000
288 290 48 3 31 47 p1 58 1426 1787 1.25316 1787 0 0.00000
289 291 49 4 1 -1 base 197 316 197 0.62342 197 0 0.00000
290 292 50 4 2 49 p1 58 362 255 0.70442 255 0 0.00000
291 293 51 2 13 17 p1 58 594 739 1.24411 2781 2042 2.76319
292 294 52 5 1 -1 base 369 640 369 0.57656 369 0 0.00000
293 295 $ hg clone --pull source-repo --config experimental.maxdeltachainspan=0 noconst-chain --config format.generaldelta=yes
294 296 requesting all changes
295 297 adding changesets
296 298 adding manifests
297 299 adding file changes
298 300 added 53 changesets with 53 changes to 53 files (+2 heads)
299 301 new changesets 61246295ee1e:99cae3713489
300 302 updating to branch default
301 303 14 files updated, 0 files merged, 0 files removed, 0 files unresolved
302 304 $ hg -R noconst-chain debugdeltachain -m
303 305 rev chain# chainlen prev delta size rawsize chainsize ratio lindist extradist extraratio
304 306 0 1 1 -1 base 46 45 46 1.02222 46 0 0.00000
305 307 1 1 2 0 p1 57 90 103 1.14444 103 0 0.00000
306 308 2 1 3 1 p1 57 135 160 1.18519 160 0 0.00000
307 309 3 1 4 2 p1 57 180 217 1.20556 217 0 0.00000
308 310 4 1 5 3 p1 57 225 274 1.21778 274 0 0.00000
309 311 5 1 6 4 p1 57 270 331 1.22593 331 0 0.00000
310 312 6 2 1 -1 base 46 45 46 1.02222 46 0 0.00000
311 313 7 2 2 6 p1 57 90 103 1.14444 103 0 0.00000
312 314 8 2 3 7 p1 57 135 160 1.18519 160 0 0.00000
313 315 9 2 4 8 p1 57 180 217 1.20556 217 0 0.00000
314 316 10 2 5 9 p1 58 226 275 1.21681 275 0 0.00000
315 317 11 2 6 10 p1 58 272 333 1.22426 333 0 0.00000
316 318 12 2 7 11 p1 58 318 391 1.22956 391 0 0.00000
317 319 13 2 8 12 p1 58 364 449 1.23352 449 0 0.00000
318 320 14 2 9 13 p1 58 410 507 1.23659 507 0 0.00000
319 321 15 2 10 14 p1 58 456 565 1.23904 565 0 0.00000
320 322 16 2 11 15 p1 58 502 623 1.24104 623 0 0.00000
321 323 17 2 12 16 p1 58 548 681 1.24270 681 0 0.00000
322 324 18 3 1 -1 base 47 46 47 1.02174 47 0 0.00000
323 325 19 3 2 18 p1 58 92 105 1.14130 105 0 0.00000
324 326 20 3 3 19 p1 58 138 163 1.18116 163 0 0.00000
325 327 21 3 4 20 p1 58 184 221 1.20109 221 0 0.00000
326 328 22 3 5 21 p1 58 230 279 1.21304 279 0 0.00000
327 329 23 3 6 22 p1 58 276 337 1.22101 337 0 0.00000
328 330 24 3 7 23 p1 58 322 395 1.22671 395 0 0.00000
329 331 25 3 8 24 p1 58 368 453 1.23098 453 0 0.00000
330 332 26 3 9 25 p1 58 414 511 1.23430 511 0 0.00000
331 333 27 3 10 26 p1 58 460 569 1.23696 569 0 0.00000
332 334 28 3 11 27 p1 58 506 627 1.23913 627 0 0.00000
333 335 29 3 12 28 p1 58 552 685 1.24094 685 0 0.00000
334 336 30 3 13 29 p1 58 598 743 1.24247 743 0 0.00000
335 337 31 3 14 30 p1 58 644 801 1.24379 801 0 0.00000
336 338 32 3 15 31 p1 58 690 859 1.24493 859 0 0.00000
337 339 33 3 16 32 p1 58 736 917 1.24592 917 0 0.00000
338 340 34 3 17 33 p1 58 782 975 1.24680 975 0 0.00000
339 341 35 3 18 34 p1 58 828 1033 1.24758 1033 0 0.00000
340 342 36 3 19 35 p1 58 874 1091 1.24828 1091 0 0.00000
341 343 37 3 20 36 p1 58 920 1149 1.24891 1149 0 0.00000
342 344 38 3 21 37 p1 58 966 1207 1.24948 1207 0 0.00000
343 345 39 3 22 38 p1 58 1012 1265 1.25000 1265 0 0.00000
344 346 40 3 23 39 p1 58 1058 1323 1.25047 1323 0 0.00000
345 347 41 3 24 40 p1 58 1104 1381 1.25091 1381 0 0.00000
346 348 42 3 25 41 p1 58 1150 1439 1.25130 1439 0 0.00000
347 349 43 3 26 42 p1 58 1196 1497 1.25167 1497 0 0.00000
348 350 44 3 27 43 p1 58 1242 1555 1.25201 1555 0 0.00000
349 351 45 3 28 44 p1 58 1288 1613 1.25233 1613 0 0.00000
350 352 46 3 29 45 p1 58 1334 1671 1.25262 1671 0 0.00000
351 353 47 3 30 46 p1 58 1380 1729 1.25290 1729 0 0.00000
352 354 48 3 31 47 p1 58 1426 1787 1.25316 1787 0 0.00000
353 355 49 1 7 5 p1 58 316 389 1.23101 2857 2468 6.34447
354 356 50 1 8 49 p1 58 362 447 1.23481 2915 2468 5.52125
355 357 51 2 13 17 p1 58 594 739 1.24411 2642 1903 2.57510
356 358 52 2 14 51 p1 58 640 797 1.24531 2700 1903 2.38770
@@ -1,170 +1,172 b''
1 #require no-reposimplestore
2
1 3 Test unionrepo functionality
2 4
3 5 Create one repository
4 6
5 7 $ hg init repo1
6 8 $ cd repo1
7 9 $ touch repo1-0
8 10 $ echo repo1-0 > f
9 11 $ hg ci -Aqmrepo1-0
10 12 $ touch repo1-1
11 13 $ echo repo1-1 >> f
12 14 $ hg ci -Aqmrepo1-1
13 15 $ touch repo1-2
14 16 $ echo repo1-2 >> f
15 17 $ hg ci -Aqmrepo1-2
16 18 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
17 19 2:68c0685446a3 repo1-2
18 20 1:8a58db72e69d repo1-1
19 21 0:f093fec0529b repo1-0
20 22 $ tip1=`hg id -q`
21 23 $ cd ..
22 24
23 25 - and a clone with a not-completely-trivial history
24 26
25 27 $ hg clone -q repo1 --rev 0 repo2
26 28 $ cd repo2
27 29 $ touch repo2-1
28 30 $ sed '1i\
29 31 > repo2-1 at top
30 32 > ' f > f.tmp
31 33 $ mv f.tmp f
32 34 $ hg ci -Aqmrepo2-1
33 35 $ touch repo2-2
34 36 $ hg pull -q ../repo1 -r 1
35 37 $ hg merge -q
36 38 $ hg ci -Aqmrepo2-2-merge
37 39 $ touch repo2-3
38 40 $ echo repo2-3 >> f
39 41 $ hg ci -mrepo2-3
40 42 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
41 43 4:2f0d178c469c repo2-3
42 44 3:9e6fb3e0b9da repo2-2-merge
43 45 2:8a58db72e69d repo1-1
44 46 1:c337dba826e7 repo2-1
45 47 0:f093fec0529b repo1-0
46 48 $ cd ..
47 49
48 50 revisions from repo2 appear as appended / pulled to repo1
49 51
50 52 $ hg -R union:repo1+repo2 log --template '{rev}:{node|short} {desc|firstline}\n'
51 53 5:2f0d178c469c repo2-3
52 54 4:9e6fb3e0b9da repo2-2-merge
53 55 3:c337dba826e7 repo2-1
54 56 2:68c0685446a3 repo1-2
55 57 1:8a58db72e69d repo1-1
56 58 0:f093fec0529b repo1-0
57 59
58 60 manifest can be retrieved for revisions in both repos
59 61
60 62 $ hg -R union:repo1+repo2 mani -r $tip1
61 63 f
62 64 repo1-0
63 65 repo1-1
64 66 repo1-2
65 67 $ hg -R union:repo1+repo2 mani -r 4
66 68 f
67 69 repo1-0
68 70 repo1-1
69 71 repo2-1
70 72 repo2-2
71 73
72 74 files can be retrieved form both repos
73 75
74 76 $ hg -R repo1 cat repo1/f -r2
75 77 repo1-0
76 78 repo1-1
77 79 repo1-2
78 80
79 81 $ hg -R union:repo1+repo2 cat -r$tip1 repo1/f
80 82 repo1-0
81 83 repo1-1
82 84 repo1-2
83 85
84 86 $ hg -R union:repo1+repo2 cat -r4 $TESTTMP/repo1/f
85 87 repo2-1 at top
86 88 repo1-0
87 89 repo1-1
88 90
89 91 files can be compared across repos
90 92
91 93 $ hg -R union:repo1+repo2 diff -r$tip1 -rtip
92 94 diff -r 68c0685446a3 -r 2f0d178c469c f
93 95 --- a/f Thu Jan 01 00:00:00 1970 +0000
94 96 +++ b/f Thu Jan 01 00:00:00 1970 +0000
95 97 @@ -1,3 +1,4 @@
96 98 +repo2-1 at top
97 99 repo1-0
98 100 repo1-1
99 101 -repo1-2
100 102 +repo2-3
101 103
102 104 heads from both repos are found correctly
103 105
104 106 $ hg -R union:repo1+repo2 heads --template '{rev}:{node|short} {desc|firstline}\n'
105 107 5:2f0d178c469c repo2-3
106 108 2:68c0685446a3 repo1-2
107 109
108 110 revsets works across repos
109 111
110 112 $ hg -R union:repo1+repo2 id -r "ancestor($tip1, 5)"
111 113 8a58db72e69d
112 114
113 115 annotate works - an indication that linkrevs works
114 116
115 117 $ hg --cwd repo1 -Runion:../repo2 annotate $TESTTMP/repo1/f -r tip
116 118 3: repo2-1 at top
117 119 0: repo1-0
118 120 1: repo1-1
119 121 5: repo2-3
120 122
121 123 union repos can be cloned ... and clones works correctly
122 124
123 125 $ hg clone -U union:repo1+repo2 repo3
124 126 requesting all changes
125 127 adding changesets
126 128 adding manifests
127 129 adding file changes
128 130 added 6 changesets with 11 changes to 6 files (+1 heads)
129 131 new changesets f093fec0529b:2f0d178c469c
130 132
131 133 $ hg -R repo3 paths
132 134 default = union:repo1+repo2
133 135
134 136 $ hg -R repo3 verify
135 137 checking changesets
136 138 checking manifests
137 139 crosschecking files in changesets and manifests
138 140 checking files
139 141 6 files, 6 changesets, 11 total revisions
140 142
141 143 $ hg -R repo3 heads --template '{rev}:{node|short} {desc|firstline}\n'
142 144 5:2f0d178c469c repo2-3
143 145 2:68c0685446a3 repo1-2
144 146
145 147 $ hg -R repo3 log --template '{rev}:{node|short} {desc|firstline}\n'
146 148 5:2f0d178c469c repo2-3
147 149 4:9e6fb3e0b9da repo2-2-merge
148 150 3:c337dba826e7 repo2-1
149 151 2:68c0685446a3 repo1-2
150 152 1:8a58db72e69d repo1-1
151 153 0:f093fec0529b repo1-0
152 154
153 155 union repos should use the correct rev number (issue5024)
154 156
155 157 $ hg init a
156 158 $ cd a
157 159 $ echo a0 >> f
158 160 $ hg ci -Aqm a0
159 161 $ cd ..
160 162 $ hg init b
161 163 $ cd b
162 164 $ echo b0 >> f
163 165 $ hg ci -Aqm b0
164 166 $ echo b1 >> f
165 167 $ hg ci -qm b1
166 168 $ cd ..
167 169
168 170 "hg files -v" to call fctx.size() -> fctx.iscensored()
169 171 $ hg files -R union:b+a -r2 -v
170 172 3 b/f
General Comments 0
You need to be logged in to leave comments. Login now