need an in-branch-p predicate for revision ids

Bug #434079 reported by Samuel Bronson
6
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?

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 434079] [NEW] need an in-branch-p predicate for revision ids

-----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-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkq3opMACgkQJdeBCYSNAAMI1gCgmqKUyIPC3bSw2L/dg7jIq4+W
RjwAoKsL5Lk1jd4Z9NQmjiyu1PO1myyr
=ZY1z
-----END PGP SIGNATURE-----

Revision history for this message
Robert Collins (lifeless) wrote :

-----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?

bzr-search wants an oracle; bzr does too. That requires a bit more work :)

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

iEYEARECAAYFAkq38b8ACgkQ42zgmrPGrq5bagCgjQzQpquj+P3l5x+2T78W9wJR
02kAoKK5lw4Mlz85xVFmkROT1OgqHp+3
=SZ4M
-----END PGP SIGNATURE-----

Vincent Ladeuil (vila)
Changed in bzr:
status: New → Confirmed
importance: Undecided → Wishlist
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.