← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~cjwatson/launchpad/minimal-recipe-text-bzr into lp:launchpad

 

Colin Watson has proposed merging lp:~cjwatson/launchpad/minimal-recipe-text-bzr into lp:launchpad with lp:~cjwatson/launchpad/sprd-utilities as a prerequisite.

Commit message:
Rename MINIMAL_RECIPE_TEXT to MINIMAL_RECIPE_TEXT_BZR.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #1453022 in Launchpad itself: "Please support daily builds via git"
  https://bugs.launchpad.net/launchpad/+bug/1453022

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/minimal-recipe-text-bzr/+merge/282231

Rename MINIMAL_RECIPE_TEXT to MINIMAL_RECIPE_TEXT_BZR.  git-build-recipe is going to want something slightly different here, so this is a bit of preliminary refactoring before putting Git recipes in place.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/minimal-recipe-text-bzr into lp:launchpad.
=== modified file 'lib/lp/code/browser/sourcepackagerecipe.py'
--- lib/lp/code/browser/sourcepackagerecipe.py	2016-01-11 21:30:07 +0000
+++ lib/lp/code/browser/sourcepackagerecipe.py	2016-01-11 21:30:07 +0000
@@ -94,7 +94,7 @@
     IRecipeBranchSource,
     ISourcePackageRecipe,
     ISourcePackageRecipeSource,
-    MINIMAL_RECIPE_TEXT,
+    MINIMAL_RECIPE_TEXT_BZR,
     )
 from lp.code.model.branchtarget import PersonBranchTarget
 from lp.code.vocabularies.sourcepackagerecipe import BuildableDistroSeries
@@ -761,7 +761,7 @@
                 SeriesStatus.CURRENT, SeriesStatus.DEVELOPMENT)]
         return {
             'name': self._find_unused_name(self.user),
-            'recipe_text': MINIMAL_RECIPE_TEXT % self.context.bzr_identity,
+            'recipe_text': MINIMAL_RECIPE_TEXT_BZR % self.context.bzr_identity,
             'owner': self.user,
             'distroseries': series,
             'build_daily': True,

=== modified file 'lib/lp/code/browser/tests/test_sourcepackagerecipe.py'
--- lib/lp/code/browser/tests/test_sourcepackagerecipe.py	2015-09-28 17:38:45 +0000
+++ lib/lp/code/browser/tests/test_sourcepackagerecipe.py	2016-01-11 21:30:07 +0000
@@ -34,7 +34,7 @@
 from lp.code.browser.sourcepackagerecipebuild import (
     SourcePackageRecipeBuildView,
     )
-from lp.code.interfaces.sourcepackagerecipe import MINIMAL_RECIPE_TEXT
+from lp.code.interfaces.sourcepackagerecipe import MINIMAL_RECIPE_TEXT_BZR
 from lp.code.tests.helpers import recipe_parser_newest_version
 from lp.registry.interfaces.person import TeamMembershipPolicy
 from lp.registry.interfaces.pocket import PackagePublishingPocket
@@ -449,7 +449,7 @@
     def test_create_recipe_bad_base_branch(self):
         # If a user tries to create source package recipe with a bad base
         # branch location, they should get an error.
-        browser = self.createRecipe(MINIMAL_RECIPE_TEXT % 'foo')
+        browser = self.createRecipe(MINIMAL_RECIPE_TEXT_BZR % 'foo')
         self.assertEqual(
             get_feedback_messages(browser.contents)[1],
             'foo is not a branch on Launchpad.')
@@ -461,7 +461,7 @@
             name='ratatouille', displayname='Ratatouille')
         branch = self.factory.makeBranch(
             owner=self.chef, product=product, name='veggies')
-        recipe = MINIMAL_RECIPE_TEXT % branch.bzr_identity
+        recipe = MINIMAL_RECIPE_TEXT_BZR % branch.bzr_identity
         recipe += 'nest packaging foo debian'
         browser = self.createRecipe(recipe, branch)
         self.assertEqual(
@@ -518,7 +518,7 @@
             owner=self.user, information_type=InformationType.USERDATA)
         with person_logged_in(self.user):
             bzr_identity = branch.bzr_identity
-        recipe_text = MINIMAL_RECIPE_TEXT % bzr_identity
+        recipe_text = MINIMAL_RECIPE_TEXT_BZR % bzr_identity
         browser = self.createRecipe(recipe_text)
         self.assertEqual(
             get_feedback_messages(browser.contents)[1],
@@ -761,7 +761,7 @@
         browser.getControl(name='field.name').value = 'fings'
         browser.getControl('Description').value = 'This is stuff'
         browser.getControl('Recipe text').value = (
-            MINIMAL_RECIPE_TEXT % meat_path)
+            MINIMAL_RECIPE_TEXT_BZR % meat_path)
         browser.getControl('Secret Squirrel').click()
         browser.getControl('Mumbly Midget').click()
         browser.getControl('PPA 2').click()
@@ -828,7 +828,7 @@
         browser.getControl(name='field.name').value = 'fings'
         browser.getControl('Description').value = 'This is stuff'
         browser.getControl('Recipe text').value = (
-            MINIMAL_RECIPE_TEXT % meat_path)
+            MINIMAL_RECIPE_TEXT_BZR % meat_path)
         browser.getControl('Secret Squirrel').click()
         browser.getControl('Mumbly Midget').click()
         browser.getControl('Update Recipe').click()
@@ -926,7 +926,7 @@
         browser.getControl(name='field.name').value = 'fings'
         browser.getControl('Description').value = 'This is stuff'
         browser.getControl('Recipe text').value = (
-            MINIMAL_RECIPE_TEXT % meat_path)
+            MINIMAL_RECIPE_TEXT_BZR % meat_path)
         browser.getControl('Secret Squirrel').click()
         browser.getControl('Mumbly Midget').click()
         browser.getControl('Update Recipe').click()
@@ -943,7 +943,7 @@
             owner=self.user, information_type=InformationType.USERDATA)
         with person_logged_in(self.user):
             bzr_identity = branch.bzr_identity
-        recipe_text = MINIMAL_RECIPE_TEXT % bzr_identity
+        recipe_text = MINIMAL_RECIPE_TEXT_BZR % bzr_identity
         browser = self.getViewBrowser(recipe, '+edit')
         browser.getControl('Recipe text').value = recipe_text
         browser.getControl('Update Recipe').click()

=== modified file 'lib/lp/code/interfaces/sourcepackagerecipe.py'
--- lib/lp/code/interfaces/sourcepackagerecipe.py	2016-01-11 21:30:07 +0000
+++ lib/lp/code/interfaces/sourcepackagerecipe.py	2016-01-11 21:30:07 +0000
@@ -13,7 +13,7 @@
     'ISourcePackageRecipeData',
     'ISourcePackageRecipeDataSource',
     'ISourcePackageRecipeSource',
-    'MINIMAL_RECIPE_TEXT',
+    'MINIMAL_RECIPE_TEXT_BZR',
     ]
 
 
@@ -66,7 +66,7 @@
 from lp.soyuz.interfaces.archive import IArchive
 
 
-MINIMAL_RECIPE_TEXT = dedent(u'''\
+MINIMAL_RECIPE_TEXT_BZR = dedent(u'''\
     # bzr-builder format 0.3 deb-version {debupstream}-0~{revno}
     %s
     ''')

=== modified file 'lib/lp/code/model/tests/test_sourcepackagerecipe.py'
--- lib/lp/code/model/tests/test_sourcepackagerecipe.py	2015-09-12 00:23:59 +0000
+++ lib/lp/code/model/tests/test_sourcepackagerecipe.py	2016-01-11 21:30:07 +0000
@@ -38,7 +38,7 @@
     ISourcePackageRecipe,
     ISourcePackageRecipeSource,
     ISourcePackageRecipeView,
-    MINIMAL_RECIPE_TEXT,
+    MINIMAL_RECIPE_TEXT_BZR,
     )
 from lp.code.interfaces.sourcepackagerecipebuild import (
     ISourcePackageRecipeBuild,
@@ -997,7 +997,7 @@
 
     def makeRecipeText(self):
         branch = self.factory.makeBranch()
-        return MINIMAL_RECIPE_TEXT % branch.bzr_identity
+        return MINIMAL_RECIPE_TEXT_BZR % branch.bzr_identity
 
     def makeRecipe(self, user=None, owner=None, recipe_text=None,
                    version='devel'):

=== modified file 'lib/lp/testing/factory.py'
--- lib/lp/testing/factory.py	2015-10-13 13:22:08 +0000
+++ lib/lp/testing/factory.py	2016-01-11 21:30:07 +0000
@@ -123,7 +123,7 @@
 from lp.code.interfaces.revision import IRevisionSet
 from lp.code.interfaces.sourcepackagerecipe import (
     ISourcePackageRecipeSource,
-    MINIMAL_RECIPE_TEXT,
+    MINIMAL_RECIPE_TEXT_BZR,
     )
 from lp.code.interfaces.sourcepackagerecipebuild import (
     ISourcePackageRecipeBuildSource,
@@ -2897,7 +2897,7 @@
             branches = (self.makeAnyBranch(), )
         base_branch = branches[0]
         other_branches = branches[1:]
-        text = MINIMAL_RECIPE_TEXT % base_branch.bzr_identity
+        text = MINIMAL_RECIPE_TEXT_BZR % base_branch.bzr_identity
         for i, branch in enumerate(other_branches):
             text += 'merge dummy-%s %s\n' % (i, branch.bzr_identity)
         return text


Follow ups