Regression in 1.3+ with Branch5 and mismatched bzr versions

John Arbash Meinel john at arbash-meinel.com
Tue Apr 29 20:53:04 BST 2008


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

So, I just spent a long time today debugging this. The symptoms are really odd.

The bug is:
~  https://bugs.launchpad.net/bzr/+bug/214894

Looking into this, the problem is with the RemoteRepository.get_parent_map() code.

Specifically, if the server doesn't support get_parent_map() it falls back to
just calling get_revision_graph().

However, for nodes with 0 parents, get_parent_map() returns ('null:',) while
get_revision_graph() just returns ().
for get_parent_map(), a return of () means that the revision is a ghost.

This shows up for Branch5, because it checks the normalization of history when
you call set_last_revision_info(). And the _lefthand_history() code iterates
backwards, stopping when it finds a ghost.

So when you "bzr push bzr+ssh://" a Branch5 (dirstate) it checks the length of
the remote history, and doesn't include the first revision (because it thinks it
is a ghost).

The fix isn't very hard, you just need to filter the get_revision_graph() call
and substitute ('null:',) for any () nodes.

I'll work up a patch. This is probably worthy of a 1.3.2 fix if we really want
to allow bzr >1.2 to interoperate with bzr <1.2 (and 1.3.2 because that is
easier to get into Hardy than asking them to release 1.5)

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEUEARECAAYFAkgXfKAACgkQJdeBCYSNAAMr8wCXQRihDmSHR4dgk9VaQIzl9gu3
lACeLJyYy9AZVHMFe0sGRwcstnf848w=
=QkUa
-----END PGP SIGNATURE-----



More information about the bazaar mailing list