need an in-branch-p predicate for revision ids
Bug #434079 reported by
Samuel Bronson
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Wishlist
|
Unassigned |
Bug Description
Bzr-search needs an efficient way to check if a given revision-id is part of a specific branch or not in order to use a shared index for a shared repository, according to bug #358286. Probably it is a good idea to add this?
Changed in bzr: | |
status: | New → Confirmed |
importance: | Undecided → Wishlist |
tags: | added: check-for-breezy |
To post a comment you must log in.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Samuel Bronson wrote:
> Public bug reported:
>
> Bzr-search needs an efficient way to check if a given revision-id is
> part of a specific branch or not in order to use a shared index for a
> shared repository, according to bug #358286. Probably it is a good idea
> to add this?
>
> ** Affects: bzr
> Importance: Undecided
> Status: New
>
Well, there is:
revno = branch. revision_ id_to_dotted_ revno(revision_ id)
If that fails the revision_id is not in the ancestry of the branch.
It is slightly less optimal, because we do more than the minimum work to
find it. For example, we could 'stop early' if we find the revision,
before we finish reading the whole ancestry.
However, the work done is cached, so calling that 20 times should end up
being cheap for all but the first call.
John
=:->
-----BEGIN PGP SIGNATURE----- enigmail. mozdev. org/
3opMACgkQJdeBCY SNAAMI1gCgmqKUy IPC3bSw2L/ dg7jIq4+ W Z9NQmjiyu1PO1my yr
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAkq
RjwAoKsL5Lk1jd4
=ZY1z
-----END PGP SIGNATURE-----