launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #00662
[Merge] lp:~jelmer/launchpad/always-import-link into lp:launchpad/devel
Jelmer Vernooij has proposed merging lp:~jelmer/launchpad/always-import-link into lp:launchpad/devel.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers): code
This changes the main branch listing page for each project to always have a "Import a branch" link, independently of whether the project is hosting its development branch on Launchpad.
It also changes the title of the link to be "Import a branch" rather than "Import your project", per the discussion in bug 504868.
--
https://code.launchpad.net/~jelmer/launchpad/always-import-link/+merge/33070
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~jelmer/launchpad/always-import-link into lp:launchpad/devel.
=== modified file 'lib/lp/code/browser/branchlisting.py'
--- lib/lp/code/browser/branchlisting.py 2010-07-30 06:08:54 +0000
+++ lib/lp/code/browser/branchlisting.py 2010-08-18 23:38:58 +0000
@@ -1091,9 +1091,8 @@
return Link('+branchvisibility', text, icon='edit', site='mainsite')
def code_import(self):
- text = 'Import your project'
- enabled = not self.context.official_codehosting
- return Link('+new-import', text, icon='add', enabled=enabled)
+ text = 'Import a branch'
+ return Link('+new-import', text, icon='add')
class ProductBranchListingView(BranchListingView):
=== modified file 'lib/lp/code/stories/branches/xx-product-branches.txt'
--- lib/lp/code/stories/branches/xx-product-branches.txt 2010-08-13 16:08:22 +0000
+++ lib/lp/code/stories/branches/xx-product-branches.txt 2010-08-18 23:38:58 +0000
@@ -159,7 +159,7 @@
================
There are two buttons that show on the right hand side of the screen
-for project branch listings. 'Register a branch' and 'Import your project'.
+for project branch listings. 'Register a branch' and 'Import a branch'.
>>> from zope.component import getUtility
>>> from lp.registry.interfaces.product import IProductSet
@@ -175,10 +175,10 @@
>>> browser.open('http://code.launchpad.dev/firefox')
>>> print_links(browser)
Register a branch
- Import your project
+ Import a branch
If the product specifies that it officially uses Launchpad code, then
-the 'Import your project' button is not shown.
+the 'Import a branch' button is still shown.
>>> login('admin@xxxxxxxxxxxxx')
>>> product.development_focus.branch = old_branch
@@ -186,6 +186,7 @@
>>> browser.open('http://code.launchpad.dev/firefox')
>>> print_links(browser)
Register a branch
+ Import a branch
Nice wording of summary numbers
=== modified file 'lib/lp/code/stories/codeimport/xx-create-codeimport.txt'
--- lib/lp/code/stories/codeimport/xx-create-codeimport.txt 2010-04-28 02:49:58 +0000
+++ lib/lp/code/stories/codeimport/xx-create-codeimport.txt 2010-08-18 23:38:58 +0000
@@ -27,7 +27,7 @@
link on the main branch listing page for the product.
>>> browser.open('http://code.launchpad.dev/firefox')
- >>> browser.getLink('Import your project').click()
+ >>> browser.getLink('Import a branch').click()
Requesting a Subversion import
Follow ups