API question: "Rendering" a Revision?

Aaron Bentley aaron.bentley at utoronto.ca
Fri Aug 26 07:48:26 BST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Magnus Therning wrote:
> There is one thing I don't know how to do though--render a revision.
> I have a Branch object, I have a revision id (or a revno), how do I get
> that revision to be "unpacked" and be the current revision in the
> Branch?

Merge.  See, for example, commands.cmd_branch

> The merge code must do it, but I've not managed to get deep enough into
> that code to understand where/how it does it...

That's all there is.  We do a merge with THIS and BASE both set to '.'
(the empty tree-root).  That causes a merge changeset to be generated
that will turn '.' into the tree for the requested revision.  The
changeset is then applied to the tree.

That step happens in changeset.rename_to_new_create()

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDDrs60F+nu1YWqI0RAgqYAJ9gHLeQbNOqMApY8Vy8oNMTFiISiQCeMB33
Q1GON94FkOPVC74qP5oZu8Y=
=hkgQ
-----END PGP SIGNATURE-----




More information about the bazaar mailing list