[MERGE] Fix bad ghost handling in _KnitParentsProvider

Aaron Bentley aaron at aaronbentley.com
Sun Dec 30 02:21:02 GMT 2007


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

Hi all,

_KnitParentsProvider.get_parent_map had a small flaw with ghost
handling-- it would try to assign parents to ghosts.  If the ghost was
the first in the list, it would fail with a traceback, because the name
'parents' wasn't defined.  If the ghost came later, I believe it would
reuse the parents from the previous request.

This patch fixes it.

In the process, I noticed that some implementations of get_parents_map
return mappings where the values are lists, and for other
implementations, the values are tuples.  Can we standardize please?  I
suggest tuples.

Also, since the parent providers have always been a private interface, I
think we can remove get_parents, rather than just deprecating it.

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

iD8DBQFHdwCO0F+nu1YWqI0RAj04AJ0cVeUTBjQy5Sq0AImBVjE55QBtMgCeN4++
wqVHaW+wL2C9nYostpRauQA=
=FE8w
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bzr-mail-p7auN6.patch
Type: text/x-diff
Size: 4824 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20071229/2dff69d9/attachment.bin 


More information about the bazaar mailing list