Merge lp://staging/~adeuring/launchpad/no-package-translation-uploads-when-sharing into lp://staging/launchpad

Proposed by Abel Deuring
Status: Merged
Approved by: Abel Deuring
Approved revision: no longer in the source branch.
Merged at revision: 12647
Proposed branch: lp://staging/~adeuring/launchpad/no-package-translation-uploads-when-sharing
Merge into: lp://staging/launchpad
Diff against target: 351 lines (+111/-35)
5 files modified
lib/lp/soyuz/doc/distroseriesqueue-translations.txt (+13/-8)
lib/lp/soyuz/interfaces/queue.py (+9/-7)
lib/lp/soyuz/model/queue.py (+22/-13)
lib/lp/soyuz/model/sourcepackagerelease.py (+11/-6)
lib/lp/soyuz/tests/test_sourcepackagerelease.py (+56/-1)
To merge this branch: bzr merge lp://staging/~adeuring/launchpad/no-package-translation-uploads-when-sharing
Reviewer Review Type Date Requested Status
Leonard Richardson (community) Approve
Review via email: mp+54356@code.staging.launchpad.net

Commit message

[r=leonardr][bug=732612] Disable POTemplate/POFile imports from source packages if upstream translation sharing is enabled.

Description of the change

This branch fixes bug 732612: translation uploads from source package builds should stop when upstream sharing is enabled.

The fix is quite straightforward: Prevent a call of ITranslationImportQueue.addOrUpdateEntriesFromTarball() in SourcePackageRelease.attachTranslationFiles(), if translation sharing is enabled. I needed some time to figure out if attachTranslationFiles() is used anywhere: It is called by PackageUploadCustom.publishRosettaTranslations(), and grepping for publish_ROSETTA_TRANSLATIONS (as it was formerly alled) did not yield any results. The reason: The method was looked up in PackageUploadCustom.publish() by concatenating the string 'publish_' with the name of an enumeration value, and by using the resulting string in getattr(self, method_name). That works, but maked it a bit hard to figure out which method is used where, so I also changed the way how PackageUploadCustom.publish() find the right "worker method".

test: ./bin/test soyuz -vvt soyuz.tests.test_sourcepackagerelease

lint:

= Launchpad lint =

Checking for conflicts and issues in changed files.

Linting changed files:
  lib/lp/soyuz/doc/distroseriesqueue-translations.txt
  lib/lp/soyuz/interfaces/queue.py
  lib/lp/soyuz/model/queue.py
  lib/lp/soyuz/model/sourcepackagerelease.py
  lib/lp/soyuz/tests/test_sourcepackagerelease.py

./lib/lp/soyuz/doc/distroseriesqueue-translations.txt
       7: source has bad indentation.
      22: source has bad indentation.
      25: source has bad indentation.
      28: source has bad indentation.
      32: source has bad indentation.
      35: source has bad indentation.
      40: source has bad indentation.
      45: source has bad indentation.
      53: source has bad indentation.
      61: source has bad indentation.
      73: source has bad indentation.
      74: source exceeds 78 characters.
      76: source has bad indentation.
      79: source has bad indentation.
      85: source has bad indentation.
      97: source has bad indentation.
     103: source has bad indentation.
     108: source has bad indentation.
     113: source has bad indentation.
     117: want exceeds 78 characters.
     128: source has bad indentation.
     135: source has bad indentation.
     138: source has bad indentation.
     145: source has bad indentation.
     150: source has bad indentation.
     157: source has bad indentation.
     174: source has bad indentation.
     178: source has bad indentation.
     183: source has bad indentation.
     190: source has bad indentation.
     193: want exceeds 78 characters.
     195: source has bad indentation.
     199: source has bad indentation.
     207: source has bad indentation.
     222: want exceeds 78 characters.
     224: source has bad indentation.
     228: source has bad indentation.
     234: source has bad indentation.
     240: source has bad indentation.
     255: want exceeds 78 characters.
     257: source has bad indentation.
     261: source has bad indentation.
     267: source has bad indentation.
     273: source has bad indentation.
     276: want exceeds 78 characters.
     278: source has bad indentation.
     287: source has bad indentation.
     291: source has bad indentation.
     295: source has bad indentation.
     299: source has bad indentation.
     300: want exceeds 78 characters.
     305: source has bad indentation.
     315: source has bad indentation.
     318: source has bad indentation.
     323: source has bad indentation.
     327: source has bad indentation.
     328: want exceeds 78 characters.
     333: source has bad indentation.
     344: source has bad indentation.
     345: source exceeds 78 characters.
     358: source has bad indentation.
     363: source has bad indentation.
     374: source exceeds 78 characters.
     376: source has bad indentation.
     389: source has bad indentation.
     400: source has bad indentation.
     404: source has bad indentation.
     416: source has bad indentation.
     426: source has bad indentation.
     445: source has bad indentation.
./lib/lp/soyuz/model/sourcepackagerelease.py
     201: redefinition of function 'copyright' from line 192

The complaint about a redefinition of "copyright" is bogus: There is a @property named "copyright" and a @copyright.setter named "copyright".

To post a comment you must log in.
Revision history for this message
Leonard Richardson (leonardr) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.