[MERGE] Fix PlanMergeVersionedFile's no-parent handling

Aaron Bentley aaron at aaronbentley.com
Wed Jul 2 19:10:23 BST 2008


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

John Arbash Meinel wrote:
> Aaron Bentley wrote:
> | Hi all,
> |
> | This patch fixes _PlanMergeVersionedFile to be consistent with the
> | VersionedFiles interface.
> |
> | There seems to be some confusion here;

> I'm pretty sure it is supposed to return (NULL_REVISION,) for nodes
> without any parents.

I prefer (NULL_REVISION,), but consistency is the most important thing.
 Currently, it VersionedFiles certainly does not return (NULL_REVISION,)
in that case, and there is (broken, untested) code in
PlanMergeVersionedFile to work around that fact.

> I had to spend a bit of time to get pack repositories to return the
> right value, and then strip it out again for other cases.

The code that assumes parents may be an empty list dates back to
December 2007, and probably earlier.  That's code that used get_parents
rather than get_parent_map.

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

iD8DBQFIa8SP0F+nu1YWqI0RAg1CAJ9pdma5zN5pPWcgemjEPW5EIZbVEACbBF3O
OpenvtyBvPtpD90byz6MRLs=
=QMsA
-----END PGP SIGNATURE-----



More information about the bazaar mailing list