Merge lp:~rockstar/launchpad/pedantry-round2 into lp:launchpad

Proposed by Paul Hummer
Status: Merged
Approved by: Edwin Grubbs
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~rockstar/launchpad/pedantry-round2
Merge into: lp:launchpad
Prerequisite: lp:~rockstar/launchpad/pedantry-round1
Diff against target: 110 lines (+26/-10)
3 files modified
lib/lp/code/browser/branch.py (+11/-10)
lib/lp/code/stories/codeimport/xx-admin-codeimport.txt (+4/-0)
lib/lp/code/templates/branch-import-details.pt (+11/-0)
To merge this branch: bzr merge lp:~rockstar/launchpad/pedantry-round2
Reviewer Review Type Date Requested Status
Edwin Grubbs (community) code Approve
Review via email: mp+17705@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Paul Hummer (rockstar) wrote :

Hi there-

  This branch fixes bug #465247 - Basically, I just needed to move the "Edit
import" back into the page (as opposed to the navigation menu). Technically,
this shouldn't break any tests, but I'll obviously run it through ec2 and have
it land it for me.

Cheers,
Paul

Revision history for this message
Edwin Grubbs (edwin-grubbs) wrote :

Hi Paul,

Looks good.

merge-approved

-Edwin

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/lp/code/browser/branch.py'
--- lib/lp/code/browser/branch.py 2010-01-20 03:37:27 +0000
+++ lib/lp/code/browser/branch.py 2010-01-21 08:40:27 +0000
@@ -188,7 +188,7 @@
188 facet = 'branches'188 facet = 'branches'
189 title = 'Edit branch'189 title = 'Edit branch'
190 links = (190 links = (
191 'edit', 'reviewer', 'edit_import', 'edit_whiteboard', 'delete')191 'edit', 'reviewer', 'edit_whiteboard', 'delete')
192192
193 def branch_is_import(self):193 def branch_is_import(self):
194 return self.context.branch_type == BranchType.IMPORTED194 return self.context.branch_type == BranchType.IMPORTED
@@ -210,14 +210,6 @@
210 return Link(210 return Link(
211 '+whiteboard', text, icon='edit', enabled=enabled)211 '+whiteboard', text, icon='edit', enabled=enabled)
212212
213 def edit_import(self):
214 text = 'Edit import source or review import'
215 enabled = (
216 self.branch_is_import() and
217 check_permission('launchpad.Edit', self.context.code_import))
218 return Link(
219 '+edit-import', text, icon='edit', enabled=enabled)
220
221 @enabled_with_permission('launchpad.Edit')213 @enabled_with_permission('launchpad.Edit')
222 def reviewer(self):214 def reviewer(self):
223 text = 'Set branch reviewer'215 text = 'Set branch reviewer'
@@ -232,7 +224,7 @@
232 links = [224 links = [
233 'add_subscriber', 'browse_revisions', 'link_bug',225 'add_subscriber', 'browse_revisions', 'link_bug',
234 'link_blueprint', 'register_merge', 'source', 'subscription',226 'link_blueprint', 'register_merge', 'source', 'subscription',
235 'edit_status', 'upgrade_branch']227 'edit_status', 'edit_import', 'upgrade_branch']
236228
237 @enabled_with_permission('launchpad.Edit')229 @enabled_with_permission('launchpad.Edit')
238 def edit_status(self):230 def edit_status(self):
@@ -299,6 +291,15 @@
299 url = self.context.codebrowse_url('files')291 url = self.context.codebrowse_url('files')
300 return Link(url, text, icon='info', enabled=enabled)292 return Link(url, text, icon='info', enabled=enabled)
301293
294 def edit_import(self):
295 text = 'Edit import source or review import'
296 enabled = True
297 enabled = (
298 self.context.branch_type == BranchType.IMPORTED and
299 check_permission('launchpad.Edit', self.context.code_import))
300 return Link(
301 '+edit-import', text, icon='edit', enabled=enabled)
302
302 @enabled_with_permission('launchpad.Edit')303 @enabled_with_permission('launchpad.Edit')
303 def upgrade_branch(self):304 def upgrade_branch(self):
304 enabled = False305 enabled = False
305306
=== modified file 'lib/lp/code/stories/codeimport/xx-admin-codeimport.txt'
--- lib/lp/code/stories/codeimport/xx-admin-codeimport.txt 2009-12-08 04:31:34 +0000
+++ lib/lp/code/stories/codeimport/xx-admin-codeimport.txt 2010-01-21 08:40:27 +0000
@@ -53,6 +53,7 @@
53 Import Status: Pending Review53 Import Status: Pending Review
54 This branch is an import of the Subversion branch54 This branch is an import of the Subversion branch
55 from svn://svn.example.com/fooix/trunk.55 from svn://svn.example.com/fooix/trunk.
56 Edit import source or review import
5657
5758
58Editing details59Editing details
@@ -157,6 +158,7 @@
157 Import Status: Reviewed158 Import Status: Reviewed
158 ...159 ...
159 The next import is scheduled to run as soon as possible.160 The next import is scheduled to run as soon as possible.
161 Edit import source or review import
160162
161 >>> for message in get_feedback_messages(import_browser.contents):163 >>> for message in get_feedback_messages(import_browser.contents):
162 ... print extract_text(message)164 ... print extract_text(message)
@@ -214,6 +216,7 @@
214 Import Status: Reviewed216 Import Status: Reviewed
215 ...217 ...
216 The next import is scheduled to run as soon as possible.218 The next import is scheduled to run as soon as possible.
219 Edit import source or review import
217220
218Now set the job as running.221Now set the job as running.
219222
@@ -242,6 +245,7 @@
242 ago. The last few lines of the job's output were:245 ago. The last few lines of the job's output were:
243 Changeset 1246 Changeset 1
244 Changeset 2247 Changeset 2
248 Edit import source or review import
245249
246250
247Import details for a import that has been imported successfully251Import details for a import that has been imported successfully
248252
=== modified file 'lib/lp/code/templates/branch-import-details.pt'
--- lib/lp/code/templates/branch-import-details.pt 2009-12-08 22:40:31 +0000
+++ lib/lp/code/templates/branch-import-details.pt 2010-01-21 08:40:27 +0000
@@ -130,6 +130,17 @@
130 </tal:result>130 </tal:result>
131 </div>131 </div>
132132
133 <div class="actions">
134 <div
135 tal:define="link context_menu/edit_import"
136 tal:condition="link/enabled"
137 >
138 <a id="linkbug"
139 class="sprite add"
140 tal:attributes="href link/url"
141 tal:content="link/text" />
142 </div>
143 </div>
133 </tal:has-codeimport>144 </tal:has-codeimport>
134 </div>145 </div>
135 </tal:imported-branch>146 </tal:imported-branch>