comparison tests/test-treemanifest.t @ 29715:55d341877316

bundlerepo: add support for treemanifests in cg3 bundles This is a little messier than I'd like, and I'll probably come back and do some more refactoring later, but as it is this unblocks narrowhg. An alternative approach (which I may do as part of the mentioned refactoring) would be to construct *all* dirlog instances up front, so that we don't have to keep track of the linkmapper method. This would avoid a reference cycle between the bundlemanifest and the bundlerepository, but I was hesitant to do all the work up front like that. With this change, it's possible to do 'hg incoming' and 'hg pull' from bundles in .hg/strip-backup in a treemanifest repository. Sadly, this doesn't make it possible to 'hg clone' one of those (if you do 'hg strip 0'), because the cg3 in the bundle gets written without a treemanifest flag. Since that's going to be an involved refactor in a different part of the code (which I *suspect* won't touch any of the code I've just written here), let's leave it as an idea for Later.
author Augie Fackler <augie@google.com>
date Fri, 05 Aug 2016 13:08:11 -0400
parents 6943dacc3b4c
children c059286a0f9c
comparison
equal deleted inserted replaced
29714:69109052d9ac 29715:55d341877316
324 saved backup bundle to $TESTTMP/repo-mixed/.hg/strip-backup/51cfd7b1e13b-78a2f3ed-backup.hg (glob) 324 saved backup bundle to $TESTTMP/repo-mixed/.hg/strip-backup/51cfd7b1e13b-78a2f3ed-backup.hg (glob)
325 $ hg debugindex --dir dir1 325 $ hg debugindex --dir dir1
326 rev offset length delta linkrev nodeid p1 p2 326 rev offset length delta linkrev nodeid p1 p2
327 0 0 127 -1 4 064927a0648a 000000000000 000000000000 327 0 0 127 -1 4 064927a0648a 000000000000 000000000000
328 1 127 111 0 5 25ecb8cb8618 000000000000 000000000000 328 1 127 111 0 5 25ecb8cb8618 000000000000 000000000000
329 $ hg incoming .hg/strip-backup/*
330 comparing with .hg/strip-backup/*-backup.hg (glob)
331 searching for changes
332 changeset: 6:51cfd7b1e13b
333 tag: tip
334 user: test
335 date: Thu Jan 01 00:00:00 1970 +0000
336 summary: modify dir1/a
337
338 $ hg pull .hg/strip-backup/*
339 pulling from .hg/strip-backup/51cfd7b1e13b-78a2f3ed-backup.hg
340 searching for changes
341 adding changesets
342 adding manifests
343 adding file changes
344 added 1 changesets with 1 changes to 1 files
345 (run 'hg update' to get a working copy)
346 $ hg --config extensions.strip= strip tip
347 saved backup bundle to $TESTTMP/repo-mixed/.hg/strip-backup/*-backup.hg (glob)
329 $ hg unbundle -q .hg/strip-backup/* 348 $ hg unbundle -q .hg/strip-backup/*
330 $ hg debugindex --dir dir1 349 $ hg debugindex --dir dir1
331 rev offset length delta linkrev nodeid p1 p2 350 rev offset length delta linkrev nodeid p1 p2
332 0 0 127 -1 4 064927a0648a 000000000000 000000000000 351 0 0 127 -1 4 064927a0648a 000000000000 000000000000
333 1 127 111 0 5 25ecb8cb8618 000000000000 000000000000 352 1 127 111 0 5 25ecb8cb8618 000000000000 000000000000