~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to scripts/ftpmaster-tools/initialize-from-parent.py

[r=gmb][bug=789091] Add support to be able to initialize a series in
        a distribution with already initialized series.

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
        arches = ()
82
82
        if options.arches is not None:
83
83
            arches = tuple(options.arches.split(','))
84
 
        # InitializeDistroSeries does not like it if the parent series is
85
 
        # specified on the child, so we must unset it and pass it in. This is
86
 
        # a temporary hack until confidence in InitializeDistroSeriesJob is
87
 
        # good, at which point this script will be obsolete.
88
 
        parent, distroseries.previous_series = (
89
 
            distroseries.previous_series, None)
90
 
        ids = InitializeDistroSeries(distroseries, [parent.id], arches)
 
84
        ids = InitializeDistroSeries(distroseries, arches=arches)
91
85
        ids.check()
92
86
        log.debug('initializing from parent(s), copying publishing records.')
93
87
        ids.initialize()