~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/registry/interfaces/distroseries.py

[r=benji][bug=795573,
 796233] On DistroSeries:+localpackagediffs ensure that the comment
 form is hidden after adding a new comment to a DistroSeriesDifference,
 prevent empty comments from being submitted,
 and add some animations and effects to make the UI less jarring and easier to
 follow.

Show diffs side-by-side

added added

removed removed

Lines of Context:
213
213
            description=_("The version string for this series.")))
214
214
    distribution = exported(
215
215
        Reference(
216
 
            Interface, # Really IDistribution, see circular import fix below.
 
216
            Interface,  # Really IDistribution, see circular import fix below.
217
217
            title=_("Distribution"), required=True,
218
218
            description=_("The distribution for which this is a series.")))
219
219
    distributionID = Attribute('The distribution ID.')
239
239
    is_derived_series = Bool(
240
240
        title=u'Is this series a derived series?', readonly=True,
241
241
        description=(u"Whether or not this series is a derived series."))
242
 
    is_initialising = Bool(
243
 
        title=u'Is this series initialising?', readonly=True,
244
 
        description=(u"Whether or not this series is initialising."))
245
242
    datereleased = exported(
246
243
        Datetime(title=_("Date released")))
247
244
    previous_series = exported(
248
245
        ReferenceChoice(
249
246
            title=_("Parent series"),
250
247
            description=_("The series from which this one was branched."),
251
 
            required=True, schema=Interface, # Really IDistroSeries, see below
 
248
            required=True, schema=Interface,  # Really IDistroSeries
252
249
            vocabulary='DistroSeries'),
253
250
        ("devel", dict(exported_as="previous_series")),
254
251
        ("1.0", dict(exported_as="parent_series")),
370
367
 
371
368
    main_archive = exported(
372
369
        Reference(
373
 
            Interface, # Really IArchive, see below for circular import fix.
 
370
            Interface,  # Really IArchive, see below for circular import fix.
374
371
            title=_('Distribution Main Archive')))
375
372
 
376
373
    supported = exported(
418
415
    architectures = exported(
419
416
        CollectionField(
420
417
            title=_("All architectures in this series."),
421
 
            value_type=Reference(schema=Interface), # IDistroArchSeries.
 
418
            value_type=Reference(schema=Interface),  # IDistroArchSeries.
422
419
            readonly=True))
423
420
 
424
421
    enabled_architectures = Attribute(
782
779
        DistroSeriesBinaryPackage objects that match the given text.
783
780
        """
784
781
 
785
 
    def createQueueEntry(pocket, changesfilename, changesfilecontent,
786
 
                         archive, signingkey=None, package_copy_job=None):
 
782
    def createQueueEntry(pocket, archive, changesfilename, changesfilecontent,
 
783
                         signingkey=None, package_copy_job=None):
787
784
        """Create a queue item attached to this distroseries.
788
785
 
789
786
        Create a new records respecting the given pocket and archive.
848
845
 
849
846
    @operation_parameters(
850
847
        parent_series=Reference(
851
 
            schema=Interface, # IDistroSeries
 
848
            schema=Interface,  # IDistroSeries
852
849
            title=_("The parent series to consider."),
853
850
            required=False),
854
851
        difference_type=Choice(
855
 
            vocabulary=DBEnumeratedType, # DistroSeriesDifferenceType
 
852
            vocabulary=DBEnumeratedType,  # DistroSeriesDifferenceType
856
853
            title=_("Only return differences of this type."), required=False),
857
854
        source_package_name_filter=TextLine(
858
855
            title=_("Only return differences for packages matching this "
859
856
                    "name."),
860
857
            required=False),
861
858
        status=Choice(
862
 
            vocabulary=DBEnumeratedType, # DistroSeriesDifferenceStatus
 
859
            vocabulary=DBEnumeratedType,  # DistroSeriesDifferenceStatus
863
860
            title=_("Only return differences of this status."),
864
861
            required=False),
865
862
        child_version_higher=Bool(
886
883
            child's version is higher than the parent's version.
887
884
        """
888
885
 
 
886
    def isInitializing():
 
887
        """Is this series initializing?"""
 
888
 
 
889
    def isInitialized():
 
890
        """Has this series been initialized?"""
 
891
 
889
892
 
890
893
class IDistroSeriesEditRestricted(Interface):
891
894
    """IDistroSeries properties which require launchpad.Edit."""
1032
1035
 
1033
1036
class DerivationError(Exception):
1034
1037
    """Raised when there is a problem deriving a distroseries."""
1035
 
    webservice_error(400) # Bad Request
 
1038
    webservice_error(400)  # Bad Request
1036
1039
    _message_prefix = "Error deriving distro series"
1037
1040
 
1038
1041