Merge lp:~thumper/launchpad/new-import-link-move into lp:launchpad

Proposed by Tim Penhey
Status: Merged
Approved by: Tim Penhey
Approved revision: no longer in the source branch.
Merged at revision: 10487
Proposed branch: lp:~thumper/launchpad/new-import-link-move
Merge into: lp:launchpad
Diff against target: 41 lines (+7/-2)
3 files modified
lib/lp/registry/browser/productseries.py (+1/-1)
lib/lp/registry/browser/tests/productseries-views.txt (+5/-0)
lib/lp/registry/templates/productseries-codesummary.pt (+1/-1)
To merge this branch: bzr merge lp:~thumper/launchpad/new-import-link-move
Reviewer Review Type Date Requested Status
Paul Hummer (community) Approve
Review via email: mp+21088@code.launchpad.net

Commit message

Make the new import link on the product series page got to a page that doesn't lose the product context.

Description of the change

Make the import hyperlink on the product series page go the the +new-import page for the project rather than the generic +code-imports/+new page.

Also add text mentioning mercurial imports.

To post a comment you must log in.
Revision history for this message
Paul Hummer (rockstar) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/registry/browser/productseries.py'
2--- lib/lp/registry/browser/productseries.py 2010-02-08 20:11:17 +0000
3+++ lib/lp/registry/browser/productseries.py 2010-03-10 22:19:18 +0000
4@@ -309,7 +309,7 @@
5 @property
6 def request_import_link(self):
7 """A link to the page for requesting a new code import."""
8- return canonical_url(getUtility(ICodeImportSet), view_name='+new')
9+ return canonical_url(self.context.product, view_name='+new-import')
10
11 @property
12 def user_branch_visible(self):
13
14=== modified file 'lib/lp/registry/browser/tests/productseries-views.txt'
15--- lib/lp/registry/browser/tests/productseries-views.txt 2010-02-09 05:13:05 +0000
16+++ lib/lp/registry/browser/tests/productseries-views.txt 2010-03-10 22:19:18 +0000
17@@ -107,6 +107,11 @@
18 >>> print view.latest_release_with_download_files.version
19 0.9.2
20
21+The view also provides a link to register a new code import.
22+
23+ >>> print view.request_import_link
24+ http://launchpad.dev/firefox/+new-import
25+
26
27 Edit ProductSeries
28 ------------------
29
30=== modified file 'lib/lp/registry/templates/productseries-codesummary.pt'
31--- lib/lp/registry/templates/productseries-codesummary.pt 2009-11-13 20:14:41 +0000
32+++ lib/lp/registry/templates/productseries-codesummary.pt 2010-03-10 22:19:18 +0000
33@@ -54,7 +54,7 @@
34 </li>
35
36 <li>
37- If the code is in git, CVS or Subversion you can
38+ If the code is in Git, Mercurial, CVS or Subversion you can
39 <a tal:attributes="href view/request_import_link">request that the branch be imported to Bazaar</a>.
40 </li>
41 </ul>