~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/code/adapters/branchmergequeuecollection.py

  • Committer: Ian Booth
  • Date: 2010-10-25 13:12:44 UTC
  • mto: This revision was merged to the branch mainline in revision 11934.
  • Revision ID: ian.booth@canonical.com-20101025131244-9wqphh6r7oi5291r
Initial prototype

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright 2009 Canonical Ltd.  This software is licensed under the
 
2
# GNU Affero General Public License version 3 (see the file LICENSE).
 
3
 
 
4
"""Adapters for different objects to branch merge queue collections."""
 
5
 
 
6
__metaclass__ = type
 
7
__all__ = [
 
8
    'branch_collection_for_person',
 
9
    ]
 
10
 
 
11
 
 
12
from zope.component import getUtility
 
13
 
 
14
from lp.code.interfaces.branchmergequeuecollection import (
 
15
    IAllBranchMergeQueues,
 
16
    )
 
17
 
 
18
 
 
19
def merge_queue_collection_for_person(person):
 
20
    """Adapt a person to a branch collection."""
 
21
    return getUtility(IAllBranchMergeQueues).ownedBy(person)