revision_trees with no parent
John Arbash Meinel
john at arbash-meinel.com
Fri Dec 5 13:25:58 GMT 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Sandy Dunlop wrote:
> Hi,
>
> In my code I call branch.repository.revision_trees([parentid,revid])
> and then
> delta = self.rev_tree.changes_from(self.parent_tree)
> to get to get information about what's changed between two revisions.
>
> This doesn't work if revid is the first revision (1st commit after the
> branch has been inited). Can someone point me in the right direction
> of what I should be doing to get the list of files that were added in
> this revision?
>
> Thanks,
> Sandy
>
>
empty_tree = branch.repository.revision_tree(NULL_REVISION)
It is a bit of a quirk, but "revision_trees()" doesn't allow you to pass
NULL_REVISION. But
self.rev_tree.changes_from(empty_tree)
Should do what you want.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkk5K+YACgkQJdeBCYSNAAOBJwCfQMi/JOLzHEd+QWVCQuqkJNp/
dagAn1baPPEFW07+/ZrxmBLB9p0HLHzH
=E51T
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list