Fastest way to find repository heads?

Jelmer Vernooij jelmer at samba.org
Wed Jul 8 22:00:09 BST 2009


When talking to a git smart server and trying to figure out which
revisions to fetch, bzr-git has to provide the server with all of the
heads in the repository so that the client and the server can negotiate
which revisions have to be transferred.

What is the best way of doing this? At the moment I'm using this:

heads = repo.get_graph().heads(repo.all_revision_ids())

But this is taking quite some time for large repositories, is there
perhaps a more efficient way of doing this?

Alternatively, I guess the repository could store this information, but
that would obviously require a new repository format.

Cheers,

Jelmer





More information about the bazaar mailing list