qbzr needs repository.iter_branches method instead of find_branches

Bug #413970 reported by Alexander Belchenko on 2009-08-15
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Medium
Unassigned
Breezy
Low
Jelmer Vernooij
QBzr
Low
Unassigned

Bug Description

See https://bugs.launchpad.net/bugs/412058 for reference.

Gary started this change in branch https://bugs.launchpad.net/+branch/~garyvdm/bzr/find_branches_generator but we really need iter_branches method instead of changing internals of find_branches.

Dear core bzr.devs, can you say which tests new method needs to get it merged to bzr.dev?

Related branches

Martin Pool (mbp) wrote :

Gary's change http://bazaar.launchpad.net/~garyvdm/bzr/find_branches_generator/revision/4604 seems to be changing the existing method to be an iterator rather than to return a list. That's strictly speaking an API break and should be at least mentioned in NEWS. I would probably let it merge though. I don't think there would be many existing callers that really need a list and it's easy enough to cast it if you do.

Therefore we'd just need to check there are already tests for this - probably in per_repository.

summary: - [whishlist] qbzr needs repository.iter_branches method instead of
- find_branches
+ qbzr needs repository.iter_branches method instead of find_branches
Martin Pool (mbp) wrote :

... I'd suggest we do the actual 'what does this need' on a merge proposal connected to that branch.

Changed in bzr:
status: New → In Progress
importance: Undecided → Medium
Gary van der Merwe (garyvdm) wrote :

That branch cause lots of tests that expect find_branches to return a list to fails, hence I have not done a merge proposal. What I think needs to happen, is to create a new method, called iter_find_branches (or iter_branches), and change find_branches to return list(self.iter_find_branches())

Changed in qbzr:
importance: Undecided → Low
status: New → Confirmed
Alexander Belchenko (bialix) wrote :

Gary wrote: "...and change find_branches to return list(self.iter_find_branches())"

I think this is the right way.

Jelmer Vernooij (jelmer) on 2011-02-01
tags: added: api find-branches
John A Meinel (jameinel) wrote :

Since progress on this has stalled, I'm unmarking it as "In Progress" and moving it over to the "canonical-bazaar" for-a-Patch-Pilot queue.

Changed in bzr:
assignee: nobody → canonical-bazaar (canonical-bazaar)
status: In Progress → Confirmed
tags: added: patch-needswork

On Thu, 2011-04-21 at 13:14 +0000, Launchpad Bug Tracker wrote:
> John A Meinel (jameinel) has assigned this bug to you for QBzr:
>
> See https://bugs.launchpad.net/bugs/412058 for reference.
>
> Gary started this change in branch
> https://bugs.launchpad.net/+branch/~garyvdm/bzr/find_branches_generator
> but we really need iter_branches method instead of changing internals of
> find_branches.
>
> Dear core bzr.devs, can you say which tests new method needs to get it
> merged to bzr.dev?
FWIW I think find_branches should be deprecated and removed, it's a
confusing API (it's recursively called pair of functions) and hard to
extend (there are scaling issues with bzr-svn).

Cheers,

Jelmer

John A Meinel (jameinel) on 2011-04-21
Changed in bzr:
assignee: canonical-bazaar (canonical-bazaar) → nobody
Jelmer Vernooij (jelmer) on 2017-11-09
tags: added: check-for-breezy
Jelmer Vernooij (jelmer) on 2019-06-26
Changed in brz:
status: New → In Progress
importance: Undecided → Low
assignee: nobody → Jelmer Vernooij (jelmer)
tags: removed: check-for-breezy
Changed in brz:
milestone: none → 3.1.0
Jelmer Vernooij (jelmer) on 2019-10-13
Changed in brz:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers