~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/code/interfaces/codeimport.py

Merge devel.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
from canonical.launchpad.fields import PublicPersonChoice, URIField
23
23
from canonical.launchpad.validators import LaunchpadValidationError
24
24
from lp.code.enums import CodeImportReviewStatus, RevisionControlSystems
 
25
from lp.code.interfaces.branch import IBranch
25
26
 
26
27
from lazr.restful.declarations import (
27
28
    export_as_webservice_entry, exported)
 
29
from lazr.restful.fields import ReferenceChoice
28
30
 
29
31
 
30
32
def validate_cvs_root(cvsroot):
70
72
        title=_("Date Created"), required=True, readonly=True)
71
73
 
72
74
    branch = exported(
73
 
        Choice(
 
75
        ReferenceChoice(
74
76
            title=_('Branch'), required=True, readonly=True,
75
 
            vocabulary='Branch',
76
 
            description=_(
77
 
                "The Bazaar branch produced by the import system.")))
 
77
            vocabulary='Branch', schema=IBranch,
 
78
            description=_("The Bazaar branch produced by the "
 
79
                "import system.")))
78
80
 
79
81
    registrant = PublicPersonChoice(
80
82
        title=_('Registrant'), required=True, readonly=True,