~launchpad-pqm/launchpad/devel

« back to all changes in this revision

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

  • Committer: Jeroen Vermeulen
  • Date: 2011-06-06 11:33:26 UTC
  • mto: This revision was merged to the branch mainline in revision 13195.
  • Revision ID: jeroen.vermeulen@canonical.com-20110606113326-al4yg3cz6v3d0hfx
Fixed up test, satisfied it.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1063
1063
    def requestUpgrades(self):
1064
1064
        """Request sync of packages that can be easily upgraded."""
1065
1065
        target_distroseries = self.context
1066
 
        target_archive = target_distroseries.main_archive
1067
 
        job_source = getUtility(IPlainPackageCopyJobSource)
1068
 
 
1069
 
        for dsd in self.getUpgrades():
1070
 
            job_source.create(
 
1066
        copies = [
 
1067
            (
1071
1068
                dsd.source_package_name.name,
1072
 
                dsd.parent_series.main_archive, target_archive,
1073
 
                target_distroseries, PackagePublishingPocket.UPDATES,
1074
 
                package_version=dsd.parent_source_version,
1075
 
                copy_policy=PackageCopyPolicy.MASS_SYNC)
 
1069
                dsd.parent_source_version,
 
1070
                dsd.parent_series.main_archive,
 
1071
                target_distroseries.main_archive,
 
1072
                PackagePublishingPocket.UPDATES,
 
1073
            )
 
1074
            for dsd in self.getUpgrades()]
 
1075
        getUtility(IPlainPackageCopyJobSource).createMultiple(
 
1076
            target_distroseries, copies,
 
1077
            copy_policy=PackageCopyPolicy.MASS_SYNC)
1076
1078
 
1077
1079
        self.request.response.addInfoNotification(
1078
1080
            (u"Upgrades of {context.displayname} packages have been "