191 \s*1001 (re) |
191 \s*1001 (re) |
192 $ hg -R bundle-reuse-disabled debugdata my-file.txt 1 | wc -l |
192 $ hg -R bundle-reuse-disabled debugdata my-file.txt 1 | wc -l |
193 \s*1200 (re) |
193 \s*1200 (re) |
194 |
194 |
195 |
195 |
196 Check the path.*:delta-reuse-policy option |
196 Check the path.*:pulled-delta-reuse-policy option |
197 ========================================== |
197 ========================================== |
198 |
198 |
199 Get a repository with the bad parent picked and a clone ready to pull the merge |
199 Get a repository with the bad parent picked and a clone ready to pull the merge |
200 |
200 |
201 $ cp -ar bundle-reuse-enabled peer-bad-delta |
201 $ cp -ar bundle-reuse-enabled peer-bad-delta |
232 -------------------------------- |
232 -------------------------------- |
233 |
233 |
234 default is to reuse the (bad) delta |
234 default is to reuse the (bad) delta |
235 |
235 |
236 $ cp -ar local-pre-pull local-default |
236 $ cp -ar local-pre-pull local-default |
237 $ hg -R local-default pull --quiet --config 'paths.default:delta-reuse-policy=default' |
237 $ hg -R local-default pull --quiet --config 'paths.default:pulled-delta-reuse-policy=default' |
238 DBG-DELTAS: CHANGELOG: * (glob) |
238 DBG-DELTAS: CHANGELOG: * (glob) |
239 DBG-DELTAS: MANIFESTLOG: * (glob) |
239 DBG-DELTAS: MANIFESTLOG: * (glob) |
240 DBG-DELTAS: FILELOG:my-file.txt: rev=3: delta-base=2 * (glob) |
240 DBG-DELTAS: FILELOG:my-file.txt: rev=3: delta-base=2 * (glob) |
241 |
241 |
242 Pull with no-reuse |
242 Pull with no-reuse |
243 ------------------ |
243 ------------------ |
244 |
244 |
245 We don't reuse the base, so we get a better delta |
245 We don't reuse the base, so we get a better delta |
246 |
246 |
247 $ cp -ar local-pre-pull local-no-reuse |
247 $ cp -ar local-pre-pull local-no-reuse |
248 $ hg -R local-no-reuse pull --quiet --config 'paths.default:delta-reuse-policy=no-reuse' |
248 $ hg -R local-no-reuse pull --quiet --config 'paths.default:pulled-delta-reuse-policy=no-reuse' |
249 DBG-DELTAS: CHANGELOG: * (glob) |
249 DBG-DELTAS: CHANGELOG: * (glob) |
250 DBG-DELTAS: MANIFESTLOG: * (glob) |
250 DBG-DELTAS: MANIFESTLOG: * (glob) |
251 DBG-DELTAS: FILELOG:my-file.txt: rev=3: delta-base=1 * (glob) |
251 DBG-DELTAS: FILELOG:my-file.txt: rev=3: delta-base=1 * (glob) |
252 |
252 |
253 Pull with try-base |
253 Pull with try-base |
254 ------------------ |
254 ------------------ |
255 |
255 |
256 We requested to use the (bad) delta |
256 We requested to use the (bad) delta |
257 |
257 |
258 $ cp -ar local-pre-pull local-try-base |
258 $ cp -ar local-pre-pull local-try-base |
259 $ hg -R local-try-base pull --quiet --config 'paths.default:delta-reuse-policy=try-base' |
259 $ hg -R local-try-base pull --quiet --config 'paths.default:pulled-delta-reuse-policy=try-base' |
260 DBG-DELTAS: CHANGELOG: * (glob) |
260 DBG-DELTAS: CHANGELOG: * (glob) |
261 DBG-DELTAS: MANIFESTLOG: * (glob) |
261 DBG-DELTAS: MANIFESTLOG: * (glob) |
262 DBG-DELTAS: FILELOG:my-file.txt: rev=3: delta-base=2 * (glob) |
262 DBG-DELTAS: FILELOG:my-file.txt: rev=3: delta-base=2 * (glob) |
263 |
263 |
264 Case where we force a "bad" delta to be applied |
264 Case where we force a "bad" delta to be applied |
286 is an invalid chain for the client, so it is not considered and we do a full |
286 is an invalid chain for the client, so it is not considered and we do a full |
287 snapshot again. |
287 snapshot again. |
288 |
288 |
289 $ cp -ar local-pre-pull-full local-try-base-full |
289 $ cp -ar local-pre-pull-full local-try-base-full |
290 $ hg -R local-try-base-full pull --quiet \ |
290 $ hg -R local-try-base-full pull --quiet \ |
291 > --config 'paths.default:delta-reuse-policy=try-base' |
291 > --config 'paths.default:pulled-delta-reuse-policy=try-base' |
292 DBG-DELTAS: CHANGELOG: * (glob) |
292 DBG-DELTAS: CHANGELOG: * (glob) |
293 DBG-DELTAS: CHANGELOG: * (glob) |
293 DBG-DELTAS: CHANGELOG: * (glob) |
294 DBG-DELTAS: MANIFESTLOG: * (glob) |
294 DBG-DELTAS: MANIFESTLOG: * (glob) |
295 DBG-DELTAS: MANIFESTLOG: * (glob) |
295 DBG-DELTAS: MANIFESTLOG: * (glob) |
296 DBG-DELTAS: FILELOG:my-file.txt: rev=3: delta-base=2 * (glob) |
296 DBG-DELTAS: FILELOG:my-file.txt: rev=3: delta-base=2 * (glob) |
301 |
301 |
302 A full bundle should be accepted as full bundle without recomputation |
302 A full bundle should be accepted as full bundle without recomputation |
303 |
303 |
304 $ cp -ar local-pre-pull-full local-forced-full |
304 $ cp -ar local-pre-pull-full local-forced-full |
305 $ hg -R local-forced-full pull --quiet \ |
305 $ hg -R local-forced-full pull --quiet \ |
306 > --config 'paths.default:delta-reuse-policy=forced' |
306 > --config 'paths.default:pulled-delta-reuse-policy=forced' |
307 DBG-DELTAS: CHANGELOG: * (glob) |
307 DBG-DELTAS: CHANGELOG: * (glob) |
308 DBG-DELTAS: CHANGELOG: * (glob) |
308 DBG-DELTAS: CHANGELOG: * (glob) |
309 DBG-DELTAS: MANIFESTLOG: * (glob) |
309 DBG-DELTAS: MANIFESTLOG: * (glob) |
310 DBG-DELTAS: MANIFESTLOG: * (glob) |
310 DBG-DELTAS: MANIFESTLOG: * (glob) |
311 DBG-DELTAS: FILELOG:my-file.txt: rev=3: delta-base=2 * (glob) |
311 DBG-DELTAS: FILELOG:my-file.txt: rev=3: delta-base=2 * (glob) |
322 |
322 |
323 $ hg bundle -R peer-bad-delta-with-full --all --config devel.bundle.delta=p1 all-p1.hg |
323 $ hg bundle -R peer-bad-delta-with-full --all --config devel.bundle.delta=p1 all-p1.hg |
324 5 changesets found |
324 5 changesets found |
325 $ cp -ar local-pre-pull-full local-forced-full-p1 |
325 $ cp -ar local-pre-pull-full local-forced-full-p1 |
326 $ hg -R local-forced-full-p1 pull --quiet \ |
326 $ hg -R local-forced-full-p1 pull --quiet \ |
327 > --config 'paths.*:delta-reuse-policy=forced' all-p1.hg |
327 > --config 'paths.*:pulled-delta-reuse-policy=forced' all-p1.hg |
328 DBG-DELTAS: CHANGELOG: * (glob) |
328 DBG-DELTAS: CHANGELOG: * (glob) |
329 DBG-DELTAS: CHANGELOG: * (glob) |
329 DBG-DELTAS: CHANGELOG: * (glob) |
330 DBG-DELTAS: MANIFESTLOG: * (glob) |
330 DBG-DELTAS: MANIFESTLOG: * (glob) |
331 DBG-DELTAS: MANIFESTLOG: * (glob) |
331 DBG-DELTAS: MANIFESTLOG: * (glob) |
332 DBG-DELTAS: FILELOG:my-file.txt: rev=3: delta-base=2 * (glob) |
332 DBG-DELTAS: FILELOG:my-file.txt: rev=3: delta-base=2 * (glob) |