Fastest way to find repository heads?
Jelmer Vernooij
jelmer at samba.org
Wed Jul 8 22:57:45 BST 2009
Gary van der Merwe wrote:
> On Wed, Jul 8, 2009 at 11:00 PM, Jelmer Vernooij<jelmer at samba.org> wrote:
>
>> heads = repo.get_graph().heads(repo.all_revision_ids())
>>
>
> This will also get dead heads. If you don't need dead heads, you can
> find all branches in the repo, and use their tips:
>
> branches = repo.find_branches(using=True)
> heads = [branch.last_revision() for branch in branches
>
Thanks. I'd like to also find the dead heads since they may share a lot
of history with whatever we end up fetching. A common way of doing
"resume" in bzr atm is to create a shared repository and then run "bzr
branch" in it. If this process gets interrupted somehow you can
currently resume simply by removing the broken branch and running the
"bzr branch" command again.
Cheers,
Jelmer
More information about the bazaar
mailing list