l.c.b.b.GroupedDistributionSourcePackageBranchesView(LaunchpadView, BranchListingItemsMixin) : class documentation

Part of lp.code.browser.branchlisting View In Hierarchy

A view that groups branches into distro series.
Method __init__ Undocumented
Method getBranchCollection See BranchListingItemsMixin.
Method series_branches_map Return a dict of tuples for branches in the distroseries.
Method visible_branches_for_view All the branches we are going to show with this view.
Method branch_count The number of total branches the user can see.
Method groups Return a list of dicts containing series and branches.
Method show_git_link Undocumented
Method _getBranchDict Return a dict of branches grouped by distroseries.
Method _getOfficialBranches Get all the official branches for the distro source package.
Method _getSeriesBranches Return the "best" five branches.

Inherited from BranchListingItemsMixin:

Method product_series_map Return a map from branch id to a list of product series.
Method getProductSeries Get the associated product series for the branch.
Method official_package_links_map Return a map from branch id to a list of package links.
Method getSuiteSourcePackages Get the associated SuiteSourcePackages for the branch.
Method getDistroDevelSeries distribution.currentseries hits the DB every time so cache it.
Method branch_ids_with_bug_links Return a set of branch ids that should show bug badges.
Method branch_ids_with_spec_links Return a set of branch ids that should show blueprint badges.
Method branch_ids_with_merge_proposals Return a set of branches that should show merge proposal badges.
Method tip_revisions Return a set of branch ids that should show blueprint badges.
Method decoratedBranches Return the decorated branches for the branches passed in.
Method _query_optimiser Return the branch listing query optimiser utility.
Method _visible_branch_ids Return a list of the branch ids that are visible.
Method _createItem Undocumented
def __init__(self, context, request):
Undocumented
def getBranchCollection(self):
See BranchListingItemsMixin.
def _getBranchDict(self):
Return a dict of branches grouped by distroseries.
def _getOfficialBranches(self):
Get all the official branches for the distro source package.

Return a dict of distro series to a list of branches.

The branches are ordered by official pocket.

def _getSeriesBranches(self, official_branches, branches):
Return the "best" five branches.
@cachedproperty
def series_branches_map(self):
Return a dict of tuples for branches in the distroseries.

The tuple contains the branches, and the 'more_count'.

@cachedproperty
def visible_branches_for_view(self):
All the branches we are going to show with this view.

Used by the mixin class to get all the associated bugs, blueprints, and merge proposal links for badges.

@cachedproperty
def branch_count(self):
The number of total branches the user can see.
@cachedproperty
def groups(self):
Return a list of dicts containing series and branches.

The list is ordered so the most recent distro series is first.

The list contains dicts. The dict has the values:
  • distroseries - a IDistroSeries object

  • branches - an ordered list of branches

  • more-branch-count - a count of additional branches

  • package - the ISourcePackage for the distroseries,

    sourcepackagename pair

  • total-count-string - a string saying the number of branches.

The branches list will contain at most five branches. If there are non-official branches associated with the distroseries, then there will always be some non-official branches shown in the summary even if there are five different official branches (for the different pockets).

The official branches are sorted based on PackagePublishingPocket, and the non-official branches are sorted on date last modified.

@property
def show_git_link(self):
Undocumented
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.