Parent ordering

Aaron Bentley aaron.bentley at utoronto.ca
Tue Oct 25 20:51:58 BST 2005


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

Gustavo Niemeyer wrote:
> Can we trust that the
> first parent in the list is always the Branch.last_revision()
> at the commit moment?

Yes, this is intentional, and should be reliable.

> If ordering is indeed meaningful, we'll want to reproduce it
> in Launchpad, and graph viewing algorithms (like the one in
> bzrk) could also make use of it to improve the way the graph
> is built.

That sounds good, but bear in mind that, due to branch convergence, the
parent that appears first may not be the parent that appears in
revision-history.

e.g.
$ cd a
$ bzr merge ../b
$ bzr commit -m "merged b"
$ cd ../b
$ bzr pull ../a

The first parent here will be a revision in the revision-history of a,
and is unlikely to be in the revision-history of b

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

iD8DBQFDXoze0F+nu1YWqI0RArmYAJ9vPYqzeUdJoXgYY9F/UxUu3Qp36gCcC2sl
wFaYWCxA4IGAvDvdzWU4D6M=
=wnI5
-----END PGP SIGNATURE-----




More information about the bazaar mailing list