~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

  • Committer: j.c.sackett
  • Date: 2011-04-28 15:09:58 UTC
  • mfrom: (12941 devel)
  • mto: This revision was merged to the branch mainline in revision 12946.
  • Revision ID: jonathan.sackett@canonical.com-20110428150958-ecq0ipzd2jph21r9
MergedĀ inĀ devel.

Show diffs side-by-side

added added

removed removed

Lines of Context:
80
80
    BranchMergeProposalStatus,
81
81
    BranchSubscriptionDiffSize,
82
82
    BranchSubscriptionNotificationLevel,
 
83
    BranchType,
83
84
    CodeReviewNotificationLevel,
84
 
    UICreatableBranchType,
85
85
    )
86
86
from lp.code.interfaces.branchlookup import IBranchLookup
87
87
from lp.code.interfaces.branchmergequeue import IBranchMergeQueue
145
145
 
146
146
        # Can't use super-- this derives from an old-style class
147
147
        URIField._validate(self, value)
148
 
 
149
 
        # XXX thumper 2007-06-12:
150
 
        # Move this validation code into IBranchSet so it can be
151
 
        # reused in the XMLRPC code, and the Authserver.
152
 
        # This also means we could get rid of the imports above.
153
 
 
154
148
        uri = URI(self.normalize(value))
155
149
        launchpad_domain = config.vhost.mainsite.hostname
156
150
        if uri.underDomain(launchpad_domain):
987
981
            title=_('The last message we got when mirroring this branch.'),
988
982
            required=False, readonly=True))
989
983
 
990
 
    # XXX: TimPenhey 2007-08-31
991
 
    # The vocabulary set for branch_type is only used for the creation
992
 
    # of branches through the automatically generated forms, and doesn't
993
 
    # actually represent the complete range of real values that branch_type
994
 
    # may actually hold.  Import branches are not created in the same
995
 
    # way as Hosted, Mirrored or Remote branches.
996
 
    # There are two option:
997
 
    #   1) define a separate schema to use in the UI (sledgehammer solution)
998
 
    #   2) work out some way to specify a restricted vocabulary in the view
999
 
    # Personally I'd like a LAZR way to do number 2.
1000
984
    branch_type = exported(
1001
985
        Choice(
1002
986
            title=_("Branch Type"), required=True, readonly=True,
1003
 
            vocabulary=UICreatableBranchType))
 
987
            vocabulary=BranchType))
1004
988
 
1005
989
    description = exported(
1006
990
        Text(