rfc: Change get_parent_map signature so that no parents is ()

Aaron Bentley aaron at aaronbentley.com
Tue Jul 22 15:45:39 BST 2008


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

Hi all,

Our current implementations of get_parent_map are inconsistent in how
they handle versions with no parents.

They are supposed to use NULL_REVISION, but many use () instead, and
NULL_REVISION doesn't make much sense now that get_parent_map has been
redefined to operate in terms of tuples.

I have put a lot of work into making get_parent_map use NULL_KEY
instead.  NULL_KEY was defined as (NULL_REVISION,).  But I am finding
that this approach adds lots and lots of API friction, and causes lots
of confusion about where NULL_KEY should appear.  You can see my current
work here:
http://code.aaronbentley.com/bzr/bzrrepo/fix-plan-merge

I had something like 6000 test cases passing.  Then I fixed a test case,
and suddenly I was back to 200 test cases passing.  It's like swimming
in molasses.

I think the simplest fix is to just declare that get_parent_map always
selects () when a version has no parents.  I realize that this is an API
break.  But our API is already broken.

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

iD8DBQFIhfKT0F+nu1YWqI0RArNRAJsHW4uaIRkH0Sid6N1KOjn7HjdY2QCeIR8l
CqPKSNRCR8q7Z464ohggkfU=
=HHrb
-----END PGP SIGNATURE-----



More information about the bazaar mailing list