~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/code/model/branch.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:
1289
1289
    """Deletion operation that clears an official package branch."""
1290
1290
 
1291
1291
    def __init__(self, sspb):
 
1292
        # The affected object is really the sourcepackage.
1292
1293
        DeletionOperation.__init__(
1293
 
            self, sspb, _('Branch is officially linked to a source package.'))
 
1294
            self, sspb.sourcepackage,
 
1295
            _('Branch is officially linked to a source package.'))
 
1296
        # But we'll need the pocket info.
 
1297
        self.pocket = sspb.pocket
1294
1298
 
1295
1299
    def __call__(self):
1296
 
        package = self.affected_object.sourcepackage
1297
 
        pocket = self.affected_object.pocket
1298
 
        package.setBranch(pocket, None, None)
 
1300
        self.affected_object.setBranch(self.pocket, None, None)
1299
1301
 
1300
1302
 
1301
1303
class DeleteCodeImport(DeletionOperation):