~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/soyuz/doc/distroseriesqueue-translations.txt

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-07-25 17:58:32 UTC
  • mfrom: (13478.1.4 bug-788685)
  • Revision ID: launchpad@pqm.canonical.com-20110725175832-0tfzsnth7gudbpdk
[r=danilo][bug=788685] Allow translations for components other than
        'main' and 'restricted' for Oneiric and onward.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
    >>> from lp.soyuz.model.publishing import (
12
12
    ...     SourcePackagePublishingHistory)
13
13
    >>> from lp.registry.interfaces.distribution import IDistributionSet
14
 
    >>> from lp.registry.interfaces.distroseries import IDistroSeriesSet
 
14
    >>> from lp.registry.interfaces.distroseries import (
 
15
    ...     IDistroSeries,
 
16
    ...     IDistroSeriesSet,
 
17
    ...     )
15
18
    >>> from lp.registry.interfaces.pocket import PackagePublishingPocket
16
19
    >>> from lp.soyuz.interfaces.component import IComponentSet
17
20
    >>> from lp.soyuz.enums import (
363
366
    ...       def __init__(self, purpose):
364
367
    ...           self.purpose = purpose
365
368
 
 
369
    >>> class MockDistroSeries:
 
370
    ...     implements(IDistroSeries)
 
371
    ...     def __init__(self, version):
 
372
    ...         self.version = version
 
373
 
366
374
    >>> class MockSourcePackageRelease:
367
375
    ...       implements(ISourcePackageRelease)
368
 
    ...       def __init__(self, component, creator):
 
376
    ...       def __init__(self, component, creator, upload_distroseries):
369
377
    ...           self.component = getUtility(IComponentSet)[component]
 
378
    ...           self.upload_distroseries = upload_distroseries
370
379
    ...           self.creator = creator
371
380
    ...           self.packageupload = 1
372
381
    ...
405
414
    >>> release_pocket = PackagePublishingPocket.RELEASE
406
415
    >>> archive = MockArchive(ArchivePurpose.PRIMARY)
407
416
 
408
 
    >>> katie_sourcepackagerelease = MockSourcePackageRelease('main', katie)
 
417
    >>> distro_series = MockDistroSeries(u'9.04')
 
418
    >>> katie_sourcepackagerelease = MockSourcePackageRelease(
 
419
    ...     'main', katie, distro_series)
409
420
    >>> sync_package_upload = MockPackageUpload(
410
421
    ...     release_pocket, True, katie_sourcepackagerelease, archive)
411
422
    >>> sync_package_upload.isAutoSyncUpload()
429
440
 
430
441
    >>> person_set = getUtility(IPersonSet)
431
442
    >>> carlos = person_set.getByName('carlos')
432
 
    >>> carlos_sourcepackagerelease = MockSourcePackageRelease('main', carlos)
 
443
    >>> carlos_sourcepackagerelease = MockSourcePackageRelease(
 
444
    ...     'main', carlos, distro_series)
433
445
    >>> carlos_package_upload = MockPackageUpload(
434
446
    ...     release_pocket, False, carlos_sourcepackagerelease, archive)
435
447
    >>> carlos_package_upload.isAutoSyncUpload()
438
450
    >>> translations_upload.publishRosettaTranslations()
439
451
    Imported by: carlos
440
452
 
 
453
Uploads for distroseries before Oneiric or later may not be targeted
 
454
to any component but 'main' and 'restricted'.  The upload attempt is ignored.
 
455
 
 
456
    >>> katie_sourcepackagerelease = MockSourcePackageRelease(
 
457
    ...     'universe', katie, distro_series)
 
458
    >>> sync_package_upload = MockPackageUpload(
 
459
    ...     release_pocket, True, katie_sourcepackagerelease, archive)
 
460
    >>> translations_upload = MockPackageUploadCustom()
 
461
    >>> translations_upload.packageupload = sync_package_upload
 
462
    >>> translations_upload.publishRosettaTranslations()
 
463
 
 
464
For Oneiric the import succeeds for 'universe'.
 
465
 
 
466
    >>> distro_series = MockDistroSeries(u'11.10')
 
467
    >>> katie_sourcepackagerelease = MockSourcePackageRelease(
 
468
    ...     'universe', katie, distro_series)
 
469
    >>> sync_package_upload = MockPackageUpload(
 
470
    ...     release_pocket, True, katie_sourcepackagerelease, archive)
 
471
    >>> translations_upload = MockPackageUploadCustom()
 
472
    >>> translations_upload.packageupload = sync_package_upload
 
473
    >>> translations_upload.publishRosettaTranslations()
 
474
    Imported by: katie
 
475
 
 
476
And for the 12.04 release the import succeeds for 'universe'.
 
477
 
 
478
    >>> distro_series = MockDistroSeries(u'12.04')
 
479
    >>> katie_sourcepackagerelease = MockSourcePackageRelease(
 
480
    ...     'universe', katie, distro_series)
 
481
    >>> sync_package_upload = MockPackageUpload(
 
482
    ...     release_pocket, True, katie_sourcepackagerelease, archive)
 
483
    >>> translations_upload = MockPackageUploadCustom()
 
484
    >>> translations_upload.packageupload = sync_package_upload
 
485
    >>> translations_upload.publishRosettaTranslations()
 
486
    Imported by: katie
 
487
 
 
488
 
441
489
 
442
490
Translations tarball
443
491
~~~~~~~~~~~~~~~~~~~~