launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #21991
[Merge] lp:~cjwatson/launchpad/ttb-pass-series into lp:launchpad
Colin Watson has proposed merging lp:~cjwatson/launchpad/ttb-pass-series into lp:launchpad.
Commit message:
Pass a "series" argument to translation templates builds; missed in r18441.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/ttb-pass-series/+merge/333380
--
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/ttb-pass-series into lp:launchpad.
=== modified file 'lib/lp/translations/model/translationtemplatesbuildbehaviour.py'
--- lib/lp/translations/model/translationtemplatesbuildbehaviour.py 2017-04-19 11:01:16 +0000
+++ lib/lp/translations/model/translationtemplatesbuildbehaviour.py 2017-11-08 11:18:38 +0000
@@ -53,9 +53,11 @@
return "translationtemplates_%s_%d.txt" % (safe_name, self.build.id)
def composeBuildRequest(self, logger):
+ das = self._getDistroArchSeries()
args = {
- 'arch_tag': self._getDistroArchSeries().architecturetag,
+ 'arch_tag': das.architecturetag,
'branch_url': self.build.branch.composePublicURL(),
+ 'series': das.distroseries.name,
}
return ("translation-templates", self._getDistroArchSeries(), {}, args)
=== modified file 'lib/lp/translations/tests/test_translationtemplatesbuildbehaviour.py'
--- lib/lp/translations/tests/test_translationtemplatesbuildbehaviour.py 2016-02-15 01:06:56 +0000
+++ lib/lp/translations/tests/test_translationtemplatesbuildbehaviour.py 2017-11-08 11:18:38 +0000
@@ -1,4 +1,4 @@
-# Copyright 2010-2014 Canonical Ltd. This software is licensed under the
+# Copyright 2010-2017 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Unit tests for TranslationTemplatesBuildBehaviour."""
@@ -101,10 +101,13 @@
behaviour = self.makeBehaviour()
switch_dbuser(config.builddmaster.dbuser)
build_request = yield behaviour.composeBuildRequest(None)
+ das = behaviour._getDistroArchSeries()
self.assertEqual(
- ('translation-templates', behaviour._getDistroArchSeries(), {},
- {'arch_tag': behaviour._getDistroArchSeries().architecturetag,
- 'branch_url': behaviour.build.branch.composePublicURL()}),
+ ('translation-templates', das, {}, {
+ 'arch_tag': das.architecturetag,
+ 'branch_url': behaviour.build.branch.composePublicURL(),
+ 'series': das.distroseries.name,
+ }),
build_request)
def test_getDistroArchSeries(self):
Follow ups