What's the deal with MemoryTree?
Justyn Butler
justynbutler at googlemail.com
Mon Aug 24 23:55:22 BST 2009
2009/8/19 Aaron Bentley <aaron at aaronbentley.com>:
> Justyn Butler wrote:
>> Except all is not quite well, because MemoryTree appears to be limited
>> in how far it can emulate a working tree. Merging is my current
>> struggle.
>
> If you want to merge, I recommend generating a TransformPreview and
> committing it. You're right that MemoryTrees aren't a complete
> emulation of a WorkingTree. TransformPreviews and the PreviewTrees they
> generate are much more faithful. I don't anticipate us supporting
> merging into a MemoryTree any time soon. There's no reason to, since
> you can already merge and generate a PreviewTree, or just commit the
> TransformPreview directly.
>
> Aaron
Thank you for the tip.
I have now looked into TransformPreviews and PreviewTrees but after a
great deal of trying cannot persuade a PreviewTree committed using a
CommitBuilder to associate with a branch.
I have been looking mainly at test_commit_preview_tree in
test_transform.py (bzrlib 1.17).
test_commit_preview_tree finishes by getting a revision tree from the
repository using the revision id it gained from CommitBuilder.commit.
It checks the contents of a file in this revision tree.
But the revision tree is not associated with the branch. Querying the
branch will throw a NoSuchRevision error. The revision exists in the
repository only. Setting the branch-nick revprop when generating the
commit builder doesn't help.
Am I missing something?
I have looked at the tests and in doc/developers/commit.txt, is there
somewhere else I could look for clues or is the answer obvious and I'm
just not aware of it?
Thanks,
Justyn.
More information about the bazaar
mailing list