Merge lp:~rockstar/launchpad/recipe-canonical_url into lp:launchpad

Proposed by Paul Hummer on 2010-03-12
Status: Merged
Merged at revision: not available
Proposed branch: lp:~rockstar/launchpad/recipe-canonical_url
Merge into: lp:launchpad
Diff against target: 51 lines (+30/-0)
3 files modified
lib/canonical/launchpad/doc/canonical_url_examples.txt (+11/-0)
lib/lp/code/browser/configure.zcml (+11/-0)
lib/lp/code/browser/sourcepackagerecipe.py (+8/-0)
To merge this branch: bzr merge lp:~rockstar/launchpad/recipe-canonical_url
Reviewer Review Type Date Requested Status
Guilherme Salgado (community) code 2010-03-12 Approve on 2010-03-12
Review via email: mp+21271@code.launchpad.net

Description of the Change

This branch just provides canonical_url for ISourcePackageRecipe and
ISourcePackageRecipeBuild. That is all.

To post a comment you must log in.
Guilherme Salgado (salgado) wrote :

Looks good to me; just s/2009/2010 in the newly added file

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/canonical/launchpad/doc/canonical_url_examples.txt'
2--- lib/canonical/launchpad/doc/canonical_url_examples.txt 2010-02-17 14:42:16 +0000
3+++ lib/canonical/launchpad/doc/canonical_url_examples.txt 2010-03-12 18:56:33 +0000
4@@ -366,3 +366,14 @@
5 >>> canonical_url(celebs.ubuntu.getSpecification('media-integrity-check'))
6 u'http://blueprints.launchpad.dev/ubuntu/+spec/media-integrity-check'
7
8+
9+SourcePackageRecipes
10+====================
11+
12+ >>> recipe = factory.makeSourcePackageRecipe()
13+ >>> canonical_url(recipe)
14+ u'http://code.launchpad.dev/~person-name.../+recipe/generic-string...'
15+
16+ >>> build = factory.makeSourcePackageRecipeBuild(recipe=recipe)
17+ >>> canonical_url(build)
18+ u'http://code.launchpad.dev/~person-name.../+recipe/generic-string.../+build/...'
19
20=== modified file 'lib/lp/code/browser/configure.zcml'
21--- lib/lp/code/browser/configure.zcml 2010-02-25 00:29:12 +0000
22+++ lib/lp/code/browser/configure.zcml 2010-03-12 18:56:33 +0000
23@@ -1075,4 +1075,15 @@
24 name="fmt"
25 />
26
27+ <browser:url
28+ for="lp.code.interfaces.sourcepackagerecipe.ISourcePackageRecipe"
29+ attribute_to_parent="owner"
30+ path_expression="string:+recipe/${name}"
31+ rootsite="code" />
32+ <browser:url
33+ for="lp.code.interfaces.sourcepackagerecipebuild.ISourcePackageRecipeBuild"
34+ attribute_to_parent="recipe"
35+ path_expression="string:+build/${id}"
36+ rootsite="code" />
37+
38 </configure>
39
40=== added file 'lib/lp/code/browser/sourcepackagerecipe.py'
41--- lib/lp/code/browser/sourcepackagerecipe.py 1970-01-01 00:00:00 +0000
42+++ lib/lp/code/browser/sourcepackagerecipe.py 2010-03-12 18:56:33 +0000
43@@ -0,0 +1,8 @@
44+# Copyright 2010 Canonical Ltd. This software is licensed under the
45+# GNU Affero General Public License version 3 (see the file LICENSE).
46+
47+"""SourcePackageRecipe views."""
48+
49+__metaclass__ = type
50+
51+__all__ = []