Merge lp:~thumper/launchpad/fix-browser-zcml into lp:launchpad
- fix-browser-zcml
- Merge into devel
Proposed by
Tim Penhey
on 2010-08-24
| Status: | Merged |
|---|---|
| Approved by: | Paul Hummer on 2010-08-24 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | 11418 |
| Proposed branch: | lp:~thumper/launchpad/fix-browser-zcml |
| Merge into: | lp:launchpad |
| Diff against target: |
1754 lines (+215/-122) 28 files modified
lib/canonical/launchpad/doc/canonical_url_examples.txt (+1/-1) lib/canonical/launchpad/pagetests/basics/notfound-traversals.txt (+0/-9) lib/lp/blueprints/templates/specificationbranch-status.pt (+0/-6) lib/lp/code/browser/branchlisting.py (+7/-5) lib/lp/code/browser/branchvisibilitypolicy.py (+1/-1) lib/lp/code/browser/configure.zcml (+122/-15) lib/lp/code/browser/sourcepackagerecipe.py (+2/-1) lib/lp/code/browser/sourcepackagerecipelisting.py (+1/-1) lib/lp/code/browser/tests/test_branchlisting.py (+10/-5) lib/lp/code/browser/tests/test_branchmergeproposal.py (+0/-13) lib/lp/code/browser/tests/test_branchmergeproposallisting.py (+2/-1) lib/lp/code/browser/tests/test_product.py (+6/-15) lib/lp/code/stories/branches/xx-branch-edit.txt (+14/-13) lib/lp/code/stories/branches/xx-branch-listings.txt (+1/-1) lib/lp/code/stories/branches/xx-branch-url-validation.txt (+3/-2) lib/lp/code/stories/branches/xx-creating-branches.txt (+7/-7) lib/lp/code/stories/branches/xx-source-package-branches-listing.txt (+1/-1) lib/lp/code/stories/branches/xx-subscribing-branches.txt (+2/-2) lib/lp/code/stories/sourcepackagerecipes/xx-recipe-listings.txt (+2/-2) lib/lp/code/templates/branch-summary-listing.pt (+2/-2) lib/lp/code/templates/distributionsourcepackage-branches-grouped.pt (+1/-1) lib/lp/registry/browser/product.py (+1/-1) lib/lp/registry/browser/productseries.py (+2/-1) lib/lp/registry/browser/tests/productseries-views.txt (+1/-1) lib/lp/registry/stories/productseries/xx-productseries-link-branch.txt (+1/-1) lib/lp/registry/templates/productseries-codesummary.pt (+2/-3) lib/lp/testing/menu.py (+4/-7) lib/lp/testing/views.py (+19/-4) |
| To merge this branch: | bzr merge lp:~thumper/launchpad/fix-browser-zcml |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Paul Hummer (community) | 2010-08-24 | Approve on 2010-08-24 | |
|
Review via email:
|
|||
Commit Message
Limit most branch and review related views to be only on the code subdomain.
Description of the Change
This branch adds layer='...' to most of the code browser zcml. There are several places where it is kept off though, like the views needed to show merge proposal info on the bugs domain.
In order to avoid having to pass layer=CodeLayer to the create_
tests:
everything code related (everything passes in ec2 right now)
To post a comment you must log in.
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-07-19 11:58:01 +0000 |
| 3 | +++ lib/canonical/launchpad/doc/canonical_url_examples.txt 2010-08-24 02:26:48 +0000 |
| 4 | @@ -39,7 +39,7 @@ |
| 5 | The Bazaar homepage. |
| 6 | |
| 7 | >>> canonical_url(getUtility(IBazaarApplication)) |
| 8 | - u'http://launchpad.dev/+code' |
| 9 | + u'http://code.launchpad.dev/+code' |
| 10 | |
| 11 | The Answer Tracker |
| 12 | |
| 13 | |
| 14 | === modified file 'lib/canonical/launchpad/pagetests/basics/notfound-traversals.txt' |
| 15 | --- lib/canonical/launchpad/pagetests/basics/notfound-traversals.txt 2010-01-22 22:29:42 +0000 |
| 16 | +++ lib/canonical/launchpad/pagetests/basics/notfound-traversals.txt 2010-08-24 02:26:48 +0000 |
| 17 | @@ -103,7 +103,6 @@ |
| 18 | >>> check("/projectgroups/+all", auth=True) |
| 19 | >>> check("/mozilla") |
| 20 | >>> check("/mozilla/firefox") |
| 21 | ->>> check("/mozilla/+branches") |
| 22 | >>> check_redirect("/mozilla/+translations", status=301) |
| 23 | >>> check("/mozilla/+translations", host='translations.launchpad.dev') |
| 24 | |
| 25 | @@ -135,7 +134,6 @@ |
| 26 | |
| 27 | >>> check_not_found("/firefox/+milestone") |
| 28 | >>> check("/firefox/+milestone/1.0") |
| 29 | ->>> check("/firefox/+branches") |
| 30 | |
| 31 | >>> check("/distros") |
| 32 | >>> check("/distros/+add", auth=True) |
| 33 | @@ -378,13 +376,8 @@ |
| 34 | And this is for a person: |
| 35 | |
| 36 | >>> check("/~name16/+edit", auth=True) |
| 37 | ->>> check("/~name16/+branches") |
| 38 | >>> check_redirect("/~name12/+branch/gnome-terminal/pushed/", status=301) |
| 39 | >>> check_redirect("/~name12/+branch/gnome-terminal/pushed/+edit", auth=True, status=301) |
| 40 | ->>> check("/~name12/gnome-terminal/pushed/") |
| 41 | ->>> check_not_found("/~name12/+branch/gnome-terminal/fubared/") |
| 42 | ->>> check_not_found("/~name12/gnome-terminal/fubared/") |
| 43 | ->>> check("/~name12/gnome-terminal/pushed/+edit", auth=True) |
| 44 | >>> check_not_found("/~name16/+bugs/1") |
| 45 | >>> check("/~name16/+reportedbugs") |
| 46 | >>> check("/~name16/+assignedbugs") |
| 47 | @@ -408,8 +401,6 @@ |
| 48 | >>> check("/~mark/+packagebugs") |
| 49 | >>> check("/~mark/+related-software") |
| 50 | |
| 51 | ->>> check("/+code") |
| 52 | - |
| 53 | >>> check("/builders") |
| 54 | >>> check("/builders/bob/") |
| 55 | >>> check_redirect("/+builds", status=301) |
| 56 | |
| 57 | === modified file 'lib/lp/blueprints/templates/specificationbranch-status.pt' |
| 58 | --- lib/lp/blueprints/templates/specificationbranch-status.pt 2009-09-15 16:00:11 +0000 |
| 59 | +++ lib/lp/blueprints/templates/specificationbranch-status.pt 2010-08-24 02:26:48 +0000 |
| 60 | @@ -13,12 +13,6 @@ |
| 61 | |
| 62 | <div metal:use-macro="context/@@launchpad_form/form"> |
| 63 | |
| 64 | - <div metal:fill-slot="extra_top"> |
| 65 | - <ul class="branch" |
| 66 | - tal:content="structure context/branch/@@+product-summary-listing" |
| 67 | - /> |
| 68 | - </div> |
| 69 | - |
| 70 | </div> |
| 71 | </div> |
| 72 | </metal:main> |
| 73 | |
| 74 | === modified file 'lib/lp/code/browser/branchlisting.py' |
| 75 | --- lib/lp/code/browser/branchlisting.py 2010-08-20 20:31:18 +0000 |
| 76 | +++ lib/lp/code/browser/branchlisting.py 2010-08-24 02:26:48 +0000 |
| 77 | @@ -943,7 +943,9 @@ |
| 78 | enabled = self.user.inTeam(self.context) |
| 79 | text = 'Register a branch' |
| 80 | summary = 'Register a new Bazaar branch' |
| 81 | - return Link('+addbranch', text, summary, icon='add', enabled=enabled) |
| 82 | + return Link( |
| 83 | + '+addbranch', text, summary, icon='add', enabled=enabled, |
| 84 | + site='code') |
| 85 | |
| 86 | |
| 87 | class PersonProductBranchesMenu(PersonBranchesMenu): |
| 88 | @@ -1104,12 +1106,12 @@ |
| 89 | def branch_add(self): |
| 90 | text = 'Register a branch' |
| 91 | summary = 'Register a new Bazaar branch for this project' |
| 92 | - return Link('+addbranch', text, summary, icon='add') |
| 93 | + return Link('+addbranch', text, summary, icon='add', site='code') |
| 94 | |
| 95 | def list_branches(self): |
| 96 | text = 'List branches' |
| 97 | summary = 'List the branches for this project' |
| 98 | - return Link('+branches', text, summary, icon='add') |
| 99 | + return Link('+branches', text, summary, icon='add', site='code') |
| 100 | |
| 101 | @cachedproperty |
| 102 | def active_review_count(self): |
| 103 | @@ -1122,7 +1124,7 @@ |
| 104 | self.active_review_count, |
| 105 | 'active review or unmerged proposal', |
| 106 | 'active reviews or unmerged proposals') |
| 107 | - return Link('+activereviews', text) |
| 108 | + return Link('+activereviews', text, site='code') |
| 109 | |
| 110 | @enabled_with_permission('launchpad.Commercial') |
| 111 | def branch_visibility(self): |
| 112 | @@ -1131,7 +1133,7 @@ |
| 113 | |
| 114 | def code_import(self): |
| 115 | text = 'Import a branch' |
| 116 | - return Link('+new-import', text, icon='add') |
| 117 | + return Link('+new-import', text, icon='add', site='code') |
| 118 | |
| 119 | |
| 120 | class ProductBranchListingView(BranchListingView): |
| 121 | |
| 122 | === modified file 'lib/lp/code/browser/branchvisibilitypolicy.py' |
| 123 | --- lib/lp/code/browser/branchvisibilitypolicy.py 2010-08-20 20:31:18 +0000 |
| 124 | +++ lib/lp/code/browser/branchvisibilitypolicy.py 2010-08-24 02:26:48 +0000 |
| 125 | @@ -55,7 +55,7 @@ |
| 126 | |
| 127 | @property |
| 128 | def next_url(self): |
| 129 | - return canonical_url(self.context) + '/+branchvisibility' |
| 130 | + return canonical_url(self.context, view_name='+branchvisibility') |
| 131 | |
| 132 | cancel_url = next_url |
| 133 | |
| 134 | |
| 135 | === modified file 'lib/lp/code/browser/configure.zcml' |
| 136 | --- lib/lp/code/browser/configure.zcml 2010-08-09 19:49:03 +0000 |
| 137 | +++ lib/lp/code/browser/configure.zcml 2010-08-24 02:26:48 +0000 |
| 138 | @@ -37,6 +37,7 @@ |
| 139 | /> |
| 140 | <browser:page |
| 141 | for="canonical.launchpad.webapp.interfaces.ILaunchpadApplication" |
| 142 | + layer="lp.code.publisher.CodeLayer" |
| 143 | name="+recently-registered-branches" |
| 144 | class="lp.code.browser.branchlisting.RecentlyRegisteredBranchesView" |
| 145 | template="../templates/branch-listing-cross-product.pt" |
| 146 | @@ -44,6 +45,7 @@ |
| 147 | /> |
| 148 | <browser:page |
| 149 | for="canonical.launchpad.webapp.interfaces.ILaunchpadApplication" |
| 150 | + layer="lp.code.publisher.CodeLayer" |
| 151 | name="+recently-imported-branches" |
| 152 | class="lp.code.browser.branchlisting.RecentlyImportedBranchesView" |
| 153 | template="../templates/branch-listing-cross-product.pt" |
| 154 | @@ -51,6 +53,7 @@ |
| 155 | /> |
| 156 | <browser:page |
| 157 | for="canonical.launchpad.webapp.interfaces.ILaunchpadApplication" |
| 158 | + layer="lp.code.publisher.CodeLayer" |
| 159 | name="+recently-changed-branches" |
| 160 | class="lp.code.browser.branchlisting.RecentlyChangedBranchesView" |
| 161 | template="../templates/branch-listing-cross-product.pt" |
| 162 | @@ -72,6 +75,7 @@ |
| 163 | rootsite="code"/> |
| 164 | <browser:page |
| 165 | for="lp.code.interfaces.codereviewvote.ICodeReviewVoteReference" |
| 166 | + layer="lp.code.publisher.CodeLayer" |
| 167 | name="+reassign" |
| 168 | class="lp.code.browser.codereviewvote.CodeReviewVoteReassign" |
| 169 | facet="branches" |
| 170 | @@ -90,6 +94,7 @@ |
| 171 | layer="lp.code.publisher.CodeLayer"/> |
| 172 | <browser:page |
| 173 | for="lp.code.interfaces.codeimportmachine.ICodeImportMachine" |
| 174 | + layer="lp.code.publisher.CodeLayer" |
| 175 | class="lp.code.browser.codeimportmachine.CodeImportMachineView" |
| 176 | name="+index" |
| 177 | template="../templates/codeimport-machine-index.pt" |
| 178 | @@ -99,8 +104,7 @@ |
| 179 | facet="branches"> |
| 180 | <browser:navigation |
| 181 | module="lp.code.browser.codeimportmachine" |
| 182 | - classes=" |
| 183 | - CodeImportMachineSetNavigation"/> |
| 184 | + classes="CodeImportMachineSetNavigation"/> |
| 185 | <browser:url |
| 186 | for="lp.code.interfaces.codeimportmachine.ICodeImportMachineSet" |
| 187 | path_expression="string:+machines" |
| 188 | @@ -112,6 +116,7 @@ |
| 189 | layer="lp.code.publisher.CodeLayer"/> |
| 190 | <browser:page |
| 191 | for="lp.code.interfaces.codeimportmachine.ICodeImportMachineSet" |
| 192 | + layer="lp.code.publisher.CodeLayer" |
| 193 | class="lp.code.browser.codeimportmachine.CodeImportMachineSetView" |
| 194 | name="+index" |
| 195 | template="../templates/codeimport-machines.pt" |
| 196 | @@ -123,17 +128,19 @@ |
| 197 | attribute_to_parent="branch"/> |
| 198 | <browser:navigation |
| 199 | module="lp.code.browser.branchref" |
| 200 | - classes=" |
| 201 | - BranchRefNavigation"/> |
| 202 | + classes="BranchRefNavigation"/> |
| 203 | <browser:url |
| 204 | for="canonical.launchpad.interfaces.IBazaarApplication" |
| 205 | path_expression="string:+code" |
| 206 | - parent_utility="canonical.launchpad.interfaces.ILaunchpadRoot"/> |
| 207 | + parent_utility="canonical.launchpad.interfaces.ILaunchpadRoot" |
| 208 | + rootsite="code"/> |
| 209 | <browser:defaultView |
| 210 | for="canonical.launchpad.interfaces.IBazaarApplication" |
| 211 | + layer="lp.code.publisher.CodeLayer" |
| 212 | name="+index"/> |
| 213 | <browser:pages |
| 214 | for="canonical.launchpad.interfaces.IBazaarApplication" |
| 215 | + layer="lp.code.publisher.CodeLayer" |
| 216 | permission="zope.Public" |
| 217 | class="lp.code.browser.bazaar.BazaarApplicationView" |
| 218 | facet="branches"> |
| 219 | @@ -143,16 +150,17 @@ |
| 220 | </browser:pages> |
| 221 | <browser:page |
| 222 | for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal" |
| 223 | + layer="lp.code.publisher.CodeLayer" |
| 224 | name="+hierarchy" |
| 225 | class="lp.code.browser.branch.BranchHierarchy" |
| 226 | template="../../app/templates/launchpad-hierarchy.pt" |
| 227 | permission="zope.Public"/> |
| 228 | <browser:navigation |
| 229 | module="lp.code.browser.branchmergeproposal" |
| 230 | - classes=" |
| 231 | - BranchMergeProposalNavigation"/> |
| 232 | + classes="BranchMergeProposalNavigation"/> |
| 233 | <browser:defaultView |
| 234 | for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal" |
| 235 | + layer="lp.code.publisher.CodeLayer" |
| 236 | name="+index"/> |
| 237 | |
| 238 | <!-- No view needed --> |
| 239 | @@ -170,6 +178,7 @@ |
| 240 | |
| 241 | <browser:pages |
| 242 | for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal" |
| 243 | + layer="lp.code.publisher.CodeLayer" |
| 244 | class="lp.code.browser.branchmergeproposal.BranchMergeProposalView" |
| 245 | facet="branches" |
| 246 | permission="launchpad.View"> |
| 247 | @@ -197,6 +206,7 @@ |
| 248 | </browser:pages> |
| 249 | <browser:pages |
| 250 | for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal" |
| 251 | + layer="lp.code.publisher.CodeLayer" |
| 252 | class="lp.code.browser.branchmergeproposal.BranchMergeProposalEditView" |
| 253 | facet="branches" |
| 254 | permission="launchpad.Edit"> |
| 255 | @@ -207,6 +217,7 @@ |
| 256 | <browser:page |
| 257 | name="+edit-commit-message" |
| 258 | for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal" |
| 259 | + layer="lp.code.publisher.CodeLayer" |
| 260 | class="lp.code.browser.branchmergeproposal.BranchMergeProposalCommitMessageEditView" |
| 261 | facet="branches" |
| 262 | permission="launchpad.Edit" |
| 263 | @@ -214,6 +225,7 @@ |
| 264 | <browser:page |
| 265 | name="+edit-description" |
| 266 | for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal" |
| 267 | + layer="lp.code.publisher.CodeLayer" |
| 268 | class="lp.code.browser.branchmergeproposal.BranchMergeProposalDescriptionEditView" |
| 269 | facet="branches" |
| 270 | permission="launchpad.Edit" |
| 271 | @@ -221,6 +233,7 @@ |
| 272 | <browser:page |
| 273 | name="+delete" |
| 274 | for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal" |
| 275 | + layer="lp.code.publisher.CodeLayer" |
| 276 | class="lp.code.browser.branchmergeproposal.BranchMergeProposalDeleteView" |
| 277 | facet="branches" |
| 278 | permission="launchpad.Edit" |
| 279 | @@ -228,6 +241,7 @@ |
| 280 | <browser:page |
| 281 | name="+edit-status" |
| 282 | for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal" |
| 283 | + layer="lp.code.publisher.CodeLayer" |
| 284 | class="lp.code.browser.branchmergeproposal.BranchMergeProposalChangeStatusView" |
| 285 | facet="branches" |
| 286 | permission="launchpad.Edit" |
| 287 | @@ -235,6 +249,7 @@ |
| 288 | <browser:page |
| 289 | name="+request-review" |
| 290 | for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal" |
| 291 | + layer="lp.code.publisher.CodeLayer" |
| 292 | class="lp.code.browser.branchmergeproposal.BranchMergeProposalRequestReviewView" |
| 293 | facet="branches" |
| 294 | permission="launchpad.Edit" |
| 295 | @@ -242,6 +257,7 @@ |
| 296 | <browser:page |
| 297 | name="+resubmit" |
| 298 | for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal" |
| 299 | + layer="lp.code.publisher.CodeLayer" |
| 300 | class="lp.code.browser.branchmergeproposal.BranchMergeProposalResubmitView" |
| 301 | facet="branches" |
| 302 | permission="launchpad.Edit" |
| 303 | @@ -249,6 +265,7 @@ |
| 304 | <browser:page |
| 305 | name="+enqueue" |
| 306 | for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal" |
| 307 | + layer="lp.code.publisher.CodeLayer" |
| 308 | class="lp.code.browser.branchmergeproposal.BranchMergeProposalEnqueueView" |
| 309 | facet="branches" |
| 310 | permission="launchpad.Edit" |
| 311 | @@ -256,6 +273,7 @@ |
| 312 | <browser:page |
| 313 | name="+dequeue" |
| 314 | for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal" |
| 315 | + layer="lp.code.publisher.CodeLayer" |
| 316 | class="lp.code.browser.branchmergeproposal.BranchMergeProposalDequeueView" |
| 317 | facet="branches" |
| 318 | permission="launchpad.Edit" |
| 319 | @@ -263,6 +281,7 @@ |
| 320 | <browser:page |
| 321 | name="+dequeue-inline" |
| 322 | for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal" |
| 323 | + layer="lp.code.publisher.CodeLayer" |
| 324 | class="lp.code.browser.branchmergeproposal.BranchMergeProposalInlineDequeueView" |
| 325 | facet="branches" |
| 326 | permission="launchpad.Edit" |
| 327 | @@ -270,6 +289,7 @@ |
| 328 | <browser:page |
| 329 | name="+jump-queue" |
| 330 | for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal" |
| 331 | + layer="lp.code.publisher.CodeLayer" |
| 332 | class="lp.code.browser.branchmergeproposal.BranchMergeProposalJumpQueueView" |
| 333 | facet="branches" |
| 334 | permission="launchpad.Edit" |
| 335 | @@ -277,6 +297,7 @@ |
| 336 | <browser:page |
| 337 | name="+merged" |
| 338 | for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal" |
| 339 | + layer="lp.code.publisher.CodeLayer" |
| 340 | class="lp.code.browser.branchmergeproposal.BranchMergeProposalMergedView" |
| 341 | facet="branches" |
| 342 | permission="launchpad.Edit" |
| 343 | @@ -291,6 +312,7 @@ |
| 344 | <browser:page |
| 345 | name="+pagelet-subscribers" |
| 346 | for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal" |
| 347 | + layer="lp.code.publisher.CodeLayer" |
| 348 | class="lp.code.browser.branchmergeproposal.BranchMergeProposalSubscribersView" |
| 349 | facet="branches" |
| 350 | permission="launchpad.View" |
| 351 | @@ -298,6 +320,7 @@ |
| 352 | <browser:page |
| 353 | name="+comment" |
| 354 | for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal" |
| 355 | + layer="lp.code.publisher.CodeLayer" |
| 356 | class="lp.code.browser.codereviewcomment.CodeReviewCommentAddView" |
| 357 | facet="branches" |
| 358 | permission="launchpad.AnyPerson" |
| 359 | @@ -305,6 +328,7 @@ |
| 360 | <browser:page |
| 361 | name="+review" |
| 362 | for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposal" |
| 363 | + layer="lp.code.publisher.CodeLayer" |
| 364 | class="lp.code.browser.branchmergeproposal.BranchMergeProposalAddVoteView" |
| 365 | facet="branches" |
| 366 | permission="launchpad.AnyPerson" |
| 367 | @@ -316,11 +340,13 @@ |
| 368 | rootsite="code"/> |
| 369 | <browser:page |
| 370 | for="lp.code.interfaces.branchmergeproposal.IBranchMergeProposalListingBatchNavigator" |
| 371 | + layer="lp.code.publisher.CodeLayer" |
| 372 | name="+listing" |
| 373 | template="../templates/branchmergeproposal-listing.pt" |
| 374 | permission="zope.Public"/> |
| 375 | <browser:page |
| 376 | for="*" |
| 377 | + layer="lp.code.publisher.CodeLayer" |
| 378 | name="+bmp-macros" |
| 379 | permission="zope.Public" |
| 380 | template="../templates/branchmergeproposal-macros.pt"/> |
| 381 | @@ -332,16 +358,19 @@ |
| 382 | module="lp.code.browser.branchmergeproposal"/> |
| 383 | <browser:page |
| 384 | for="lp.code.interfaces.branchsubscription.IBranchSubscription" |
| 385 | + layer="lp.code.publisher.CodeLayer" |
| 386 | name="+hierarchy" |
| 387 | class="lp.code.browser.branch.BranchHierarchy" |
| 388 | template="../../app/templates/launchpad-hierarchy.pt" |
| 389 | permission="zope.Public"/> |
| 390 | <browser:defaultView |
| 391 | for="lp.code.interfaces.branchsubscription.IBranchSubscription" |
| 392 | + layer="lp.code.publisher.CodeLayer" |
| 393 | name="+index"/> |
| 394 | <browser:page |
| 395 | name="+index" |
| 396 | for="lp.code.interfaces.branchsubscription.IBranchSubscription" |
| 397 | + layer="lp.code.publisher.CodeLayer" |
| 398 | class="lp.code.browser.branchsubscription.BranchSubscriptionEditView" |
| 399 | facet="branches" |
| 400 | permission="launchpad.Edit" |
| 401 | @@ -353,22 +382,24 @@ |
| 402 | rootsite="code"/> |
| 403 | <browser:page |
| 404 | for="lp.code.interfaces.branch.IBranch" |
| 405 | + layer="lp.code.publisher.CodeLayer" |
| 406 | name="+hierarchy" |
| 407 | class="lp.code.browser.branch.BranchHierarchy" |
| 408 | template="../../app/templates/launchpad-hierarchy.pt" |
| 409 | permission="zope.Public"/> |
| 410 | <browser:defaultView |
| 411 | for="lp.code.interfaces.branch.IBranch" |
| 412 | + layer="lp.code.publisher.CodeLayer" |
| 413 | name="+index"/> |
| 414 | <browser:url |
| 415 | for="lp.code.interfaces.branch.IBranch" |
| 416 | urldata="lp.code.browser.branch.BranchURL"/> |
| 417 | <browser:navigation |
| 418 | module="lp.code.browser.branch" |
| 419 | - classes=" |
| 420 | - BranchNavigation"/> |
| 421 | + classes="BranchNavigation"/> |
| 422 | <browser:pages |
| 423 | for="lp.code.interfaces.branch.IBranch" |
| 424 | + layer="lp.code.publisher.CodeLayer" |
| 425 | facet="branches" |
| 426 | permission="zope.Public" |
| 427 | class="lp.code.browser.branch.BranchView"> |
| 428 | @@ -410,6 +441,7 @@ |
| 429 | </browser:pages> |
| 430 | <browser:pages |
| 431 | for="lp.code.interfaces.branch.IBranch" |
| 432 | + layer="lp.code.publisher.CodeLayer" |
| 433 | permission="zope.Public"> |
| 434 | <browser:page |
| 435 | name="+portlet-privacy" |
| 436 | @@ -421,6 +453,7 @@ |
| 437 | <browser:page |
| 438 | name="+portlet-subscribers" |
| 439 | for="lp.code.interfaces.branch.IBranch" |
| 440 | + layer="lp.code.publisher.CodeLayer" |
| 441 | class="lp.code.browser.branch.BranchSubscriptionsView" |
| 442 | facet="branches" |
| 443 | permission="zope.Public" |
| 444 | @@ -428,11 +461,13 @@ |
| 445 | <browser:page |
| 446 | name="+branch-portlet-subscriber-content" |
| 447 | for="lp.code.interfaces.branch.IBranch" |
| 448 | + layer="lp.code.publisher.CodeLayer" |
| 449 | class="lp.code.browser.branchsubscription.BranchPortletSubscribersContent" |
| 450 | template="../templates/branch-portlet-subscribers-content.pt" |
| 451 | permission="zope.Public" /> |
| 452 | <browser:pages |
| 453 | for="lp.code.interfaces.branch.IBranch" |
| 454 | + layer="lp.code.publisher.CodeLayer" |
| 455 | facet="overview" |
| 456 | permission="zope.Public" |
| 457 | class="lp.code.browser.branch.BranchInProductView"> |
| 458 | @@ -442,11 +477,13 @@ |
| 459 | </browser:pages> |
| 460 | <browser:page |
| 461 | for="lp.code.interfaces.branch.IBranch" |
| 462 | + layer="lp.code.publisher.CodeLayer" |
| 463 | name="+macros" |
| 464 | permission="zope.Public" |
| 465 | template="../templates/branch-macros.pt"/> |
| 466 | <browser:page |
| 467 | for="*" |
| 468 | + layer="lp.code.publisher.CodeLayer" |
| 469 | name="branch-form-macros" |
| 470 | permission="zope.Public" |
| 471 | template="../templates/branch-form-macros.pt"/> |
| 472 | @@ -454,12 +491,14 @@ |
| 473 | name="+whiteboard" |
| 474 | for="lp.code.interfaces.branch.IBranch" |
| 475 | class="lp.code.browser.branch.BranchEditWhiteboardView" |
| 476 | + layer="lp.code.publisher.CodeLayer" |
| 477 | facet="branches" |
| 478 | permission="launchpad.AnyPerson" |
| 479 | template="../../app/templates/generic-edit.pt"/> |
| 480 | <browser:page |
| 481 | name="+edit-status" |
| 482 | for="lp.code.interfaces.branch.IBranch" |
| 483 | + layer="lp.code.publisher.CodeLayer" |
| 484 | class="lp.code.browser.branch.BranchEditStatusView" |
| 485 | facet="branches" |
| 486 | permission="launchpad.Edit" |
| 487 | @@ -467,6 +506,7 @@ |
| 488 | <browser:page |
| 489 | name="+edit" |
| 490 | for="lp.code.interfaces.branch.IBranch" |
| 491 | + layer="lp.code.publisher.CodeLayer" |
| 492 | class="lp.code.browser.branch.BranchEditView" |
| 493 | facet="branches" |
| 494 | permission="launchpad.Edit" |
| 495 | @@ -474,6 +514,7 @@ |
| 496 | <browser:page |
| 497 | name="+upgrade" |
| 498 | for="lp.code.interfaces.branch.IBranch" |
| 499 | + layer="lp.code.publisher.CodeLayer" |
| 500 | class="lp.code.browser.branch.BranchUpgradeView" |
| 501 | facet="branches" |
| 502 | permission="launchpad.Edit" |
| 503 | @@ -481,6 +522,7 @@ |
| 504 | <browser:page |
| 505 | name="+reviewer" |
| 506 | for="lp.code.interfaces.branch.IBranch" |
| 507 | + layer="lp.code.publisher.CodeLayer" |
| 508 | class="lp.code.browser.branch.BranchReviewerEditView" |
| 509 | facet="branches" |
| 510 | permission="launchpad.Edit" |
| 511 | @@ -488,6 +530,7 @@ |
| 512 | <browser:page |
| 513 | name="+edit-import" |
| 514 | for="lp.code.interfaces.branch.IBranch" |
| 515 | + layer="lp.code.publisher.CodeLayer" |
| 516 | class="lp.code.browser.codeimport.CodeImportEditView" |
| 517 | facet="branches" |
| 518 | permission="launchpad.Edit" |
| 519 | @@ -495,12 +538,14 @@ |
| 520 | <browser:page |
| 521 | name="+delete" |
| 522 | for="lp.code.interfaces.branch.IBranch" |
| 523 | + layer="lp.code.publisher.CodeLayer" |
| 524 | class="lp.code.browser.branch.BranchDeletionView" |
| 525 | facet="branches" |
| 526 | permission="launchpad.Edit" |
| 527 | template="../templates/branch-delete.pt"/> |
| 528 | <browser:pages |
| 529 | for="lp.code.interfaces.branch.IBranch" |
| 530 | + layer="lp.code.publisher.CodeLayer" |
| 531 | class="lp.code.browser.branch.BranchMirrorStatusView" |
| 532 | facet="branches" |
| 533 | permission="launchpad.View"> |
| 534 | @@ -514,6 +559,7 @@ |
| 535 | <browser:page |
| 536 | name="+subscribe" |
| 537 | for="lp.code.interfaces.branch.IBranch" |
| 538 | + layer="lp.code.publisher.CodeLayer" |
| 539 | class="lp.code.browser.branchsubscription.BranchSubscriptionAddView" |
| 540 | facet="branches" |
| 541 | permission="launchpad.AnyPerson" |
| 542 | @@ -521,6 +567,7 @@ |
| 543 | <browser:page |
| 544 | name="+register-merge" |
| 545 | for="lp.code.interfaces.branch.IBranch" |
| 546 | + layer="lp.code.publisher.CodeLayer" |
| 547 | class="lp.code.browser.branch.RegisterBranchMergeProposalView" |
| 548 | facet="branches" |
| 549 | permission="launchpad.AnyPerson" |
| 550 | @@ -528,6 +575,7 @@ |
| 551 | <browser:page |
| 552 | name="+linkbug" |
| 553 | for="lp.code.interfaces.branch.IBranch" |
| 554 | + layer="lp.code.publisher.CodeLayer" |
| 555 | class="lp.bugs.browser.bugbranch.BranchLinkToBugView" |
| 556 | facet="branches" |
| 557 | permission="launchpad.AnyPerson" |
| 558 | @@ -535,6 +583,7 @@ |
| 559 | <browser:page |
| 560 | name="+linkblueprint" |
| 561 | for="lp.code.interfaces.branch.IBranch" |
| 562 | + layer="lp.code.publisher.CodeLayer" |
| 563 | class="lp.blueprints.browser.specificationbranch.BranchLinkToSpecificationView" |
| 564 | facet="branches" |
| 565 | permission="launchpad.AnyPerson" |
| 566 | @@ -542,6 +591,7 @@ |
| 567 | <browser:page |
| 568 | name="+addsubscriber" |
| 569 | for="lp.code.interfaces.branch.IBranch" |
| 570 | + layer="lp.code.publisher.CodeLayer" |
| 571 | class="lp.code.browser.branchsubscription.BranchSubscriptionAddOtherView" |
| 572 | facet="branches" |
| 573 | permission="launchpad.AnyPerson" |
| 574 | @@ -549,24 +599,28 @@ |
| 575 | <browser:page |
| 576 | name="+edit-subscription" |
| 577 | for="lp.code.interfaces.branch.IBranch" |
| 578 | + layer="lp.code.publisher.CodeLayer" |
| 579 | class="lp.code.browser.branchsubscription.BranchSubscriptionEditOwnView" |
| 580 | facet="branches" |
| 581 | permission="launchpad.AnyPerson" |
| 582 | template="../templates/branch-edit-subscription.pt"/> |
| 583 | <browser:page |
| 584 | for="lp.code.interfaces.branch.IBranch" |
| 585 | + layer="lp.code.publisher.CodeLayer" |
| 586 | class="lp.code.browser.branch.BranchRequestImportView" |
| 587 | name="+request-import" |
| 588 | template="../templates/inline-form-only-buttons.pt" |
| 589 | permission="launchpad.AnyPerson"/> |
| 590 | <browser:page |
| 591 | for="lp.code.interfaces.branch.IBranch" |
| 592 | + layer="lp.code.publisher.CodeLayer" |
| 593 | class="lp.code.browser.branch.TryImportAgainView" |
| 594 | name="+try-again" |
| 595 | template="../templates/inline-form-only-buttons.pt" |
| 596 | permission="launchpad.AnyPerson"/> |
| 597 | <browser:page |
| 598 | for="lp.code.interfaces.branch.IBranch" |
| 599 | + layer="lp.code.publisher.CodeLayer" |
| 600 | class="lp.code.browser.branchmergeproposallisting.BranchActiveReviewsView" |
| 601 | permission="zope.Public" |
| 602 | name="+activereviews" |
| 603 | @@ -574,6 +628,7 @@ |
| 604 | template="../templates/active-reviews.pt"/> |
| 605 | <browser:page |
| 606 | for="lp.code.interfaces.branch.IBranchBatchNavigator" |
| 607 | + layer="lp.code.publisher.CodeLayer" |
| 608 | name="+branch-listing" |
| 609 | template="../templates/branch-listing.pt" |
| 610 | permission="zope.Public"/> |
| 611 | @@ -601,6 +656,7 @@ |
| 612 | <browser:page |
| 613 | name="+spark" |
| 614 | for="lp.code.interfaces.branch.IBranch" |
| 615 | + layer="lp.code.publisher.CodeLayer" |
| 616 | class="lp.code.browser.branch.BranchSparkView" |
| 617 | facet="branches" |
| 618 | permission="zope.Public"/> |
| 619 | @@ -611,6 +667,7 @@ |
| 620 | module="lp.code.browser.branch"/> |
| 621 | <browser:page |
| 622 | for="lp.code.interfaces.codereviewcomment.ICodeReviewComment" |
| 623 | + layer="lp.code.publisher.CodeLayer" |
| 624 | name="+hierarchy" |
| 625 | class="lp.code.browser.branch.BranchHierarchy" |
| 626 | template="../../app/templates/launchpad-hierarchy.pt" |
| 627 | @@ -622,10 +679,12 @@ |
| 628 | rootsite="code"/> |
| 629 | <browser:defaultView |
| 630 | for="lp.code.interfaces.codereviewcomment.ICodeReviewComment" |
| 631 | + layer="lp.code.publisher.CodeLayer" |
| 632 | name="+index"/> |
| 633 | <browser:pages |
| 634 | facet="branches" |
| 635 | for="lp.code.interfaces.codereviewcomment.ICodeReviewComment" |
| 636 | + layer="lp.code.publisher.CodeLayer" |
| 637 | class="lp.code.browser.codereviewcomment.CodeReviewCommentView" |
| 638 | permission="zope.Public"> |
| 639 | <browser:page |
| 640 | @@ -647,6 +706,7 @@ |
| 641 | <browser:pages |
| 642 | facet="branches" |
| 643 | for="lp.code.browser.branchmergeproposal.ICodeReviewNewRevisions" |
| 644 | + layer="lp.code.publisher.CodeLayer" |
| 645 | class="lp.code.browser.branchmergeproposal.CodeReviewNewRevisionsView" |
| 646 | permission="zope.Public"> |
| 647 | <browser:page |
| 648 | @@ -660,17 +720,18 @@ |
| 649 | name="+reply" |
| 650 | facet="branches" |
| 651 | for="lp.code.interfaces.codereviewcomment.ICodeReviewComment" |
| 652 | + layer="lp.code.publisher.CodeLayer" |
| 653 | class="lp.code.browser.codereviewcomment.CodeReviewCommentAddView" |
| 654 | permission="launchpad.AnyPerson" |
| 655 | template="../templates/codereviewcomment-reply.pt"/> |
| 656 | <browser:menus |
| 657 | - classes=" |
| 658 | - CodeReviewCommentContextMenu" |
| 659 | + classes="CodeReviewCommentContextMenu" |
| 660 | module="lp.code.browser.codereviewcomment"/> |
| 661 | <facet |
| 662 | facet="branches"> |
| 663 | <browser:page |
| 664 | for="lp.code.interfaces.codeimport.ICodeImport" |
| 665 | + layer="lp.code.publisher.CodeLayer" |
| 666 | name="+macros" |
| 667 | permission="zope.Public" |
| 668 | template="../templates/codeimport-macros.pt"/> |
| 669 | @@ -688,18 +749,21 @@ |
| 670 | layer="lp.code.publisher.CodeLayer"/> |
| 671 | <browser:page |
| 672 | for="lp.code.interfaces.codeimport.ICodeImportSet" |
| 673 | + layer="lp.code.publisher.CodeLayer" |
| 674 | class="lp.code.browser.codeimport.CodeImportSetView" |
| 675 | name="+index" |
| 676 | template="../templates/codeimport-list.pt" |
| 677 | permission="zope.Public"/> |
| 678 | <browser:page |
| 679 | for="lp.code.interfaces.codeimport.ICodeImportSet" |
| 680 | + layer="lp.code.publisher.CodeLayer" |
| 681 | class="lp.code.browser.codeimport.CodeImportNewView" |
| 682 | name="+new" |
| 683 | template="../templates/codeimport-new.pt" |
| 684 | permission="launchpad.AnyPerson"/> |
| 685 | <browser:page |
| 686 | for="lp.registry.interfaces.product.IProduct" |
| 687 | + layer="lp.code.publisher.CodeLayer" |
| 688 | class="lp.code.browser.codeimport.CodeImportNewView" |
| 689 | name="+new-import" |
| 690 | template="../templates/codeimport-new.pt" |
| 691 | @@ -712,14 +776,14 @@ |
| 692 | rootsite="code"/> |
| 693 | <browser:navigation |
| 694 | module="lp.code.browser.codeimport" |
| 695 | - classes=" |
| 696 | - CodeImportSetNavigation"/> |
| 697 | + classes="CodeImportSetNavigation"/> |
| 698 | <browser:defaultView |
| 699 | for="lp.registry.interfaces.projectgroup.IProjectGroup" |
| 700 | name="+branches" |
| 701 | layer="lp.code.publisher.CodeLayer"/> |
| 702 | <browser:page |
| 703 | for="lp.registry.interfaces.sourcepackage.ISourcePackage" |
| 704 | + layer="lp.code.publisher.CodeLayer" |
| 705 | class="lp.code.browser.branchlisting.SourcePackageBranchesView" |
| 706 | permission="zope.Public" |
| 707 | facet="branches" |
| 708 | @@ -727,6 +791,7 @@ |
| 709 | template="../templates/sourcepackage-branches.pt"/> |
| 710 | <browser:page |
| 711 | for="lp.registry.interfaces.sourcepackage.ISourcePackage" |
| 712 | + layer="lp.code.publisher.CodeLayer" |
| 713 | class="lp.code.browser.summary.BranchCountSummaryView" |
| 714 | facet="branches" |
| 715 | permission="zope.Public" |
| 716 | @@ -734,6 +799,7 @@ |
| 717 | template="../templates/branch-count-summary.pt"/> |
| 718 | <browser:page |
| 719 | for="lp.registry.interfaces.distribution.IDistribution" |
| 720 | + layer="lp.code.publisher.CodeLayer" |
| 721 | class="lp.code.browser.branchlisting.DistributionBranchListingView" |
| 722 | permission="zope.Public" |
| 723 | facet="branches" |
| 724 | @@ -741,6 +807,7 @@ |
| 725 | template="../templates/generic-branch-listing.pt"/> |
| 726 | <browser:page |
| 727 | for="lp.registry.interfaces.distribution.IDistribution" |
| 728 | + layer="lp.code.publisher.CodeLayer" |
| 729 | class="lp.code.browser.summary.BranchCountSummaryView" |
| 730 | facet="branches" |
| 731 | permission="zope.Public" |
| 732 | @@ -748,6 +815,7 @@ |
| 733 | template="../templates/branch-count-summary.pt"/> |
| 734 | <browser:page |
| 735 | for="lp.registry.interfaces.distroseries.IDistroSeries" |
| 736 | + layer="lp.code.publisher.CodeLayer" |
| 737 | class="lp.code.browser.branchlisting.DistroSeriesBranchListingView" |
| 738 | permission="zope.Public" |
| 739 | facet="branches" |
| 740 | @@ -755,6 +823,7 @@ |
| 741 | template="../templates/generic-branch-listing.pt"/> |
| 742 | <browser:page |
| 743 | for="lp.registry.interfaces.distroseries.IDistroSeries" |
| 744 | + layer="lp.code.publisher.CodeLayer" |
| 745 | class="lp.code.browser.summary.BranchCountSummaryView" |
| 746 | facet="branches" |
| 747 | permission="zope.Public" |
| 748 | @@ -762,6 +831,7 @@ |
| 749 | template="../templates/branch-count-summary.pt"/> |
| 750 | <browser:page |
| 751 | for="lp.registry.interfaces.distributionsourcepackage.IDistributionSourcePackage" |
| 752 | + layer="lp.code.publisher.CodeLayer" |
| 753 | class="lp.code.browser.branchlisting.DistributionSourcePackageBranchesView" |
| 754 | permission="zope.Public" |
| 755 | facet="branches" |
| 756 | @@ -769,6 +839,7 @@ |
| 757 | template="../templates/generic-branch-listing.pt"/> |
| 758 | <browser:page |
| 759 | for="lp.registry.interfaces.distributionsourcepackage.IDistributionSourcePackage" |
| 760 | + layer="lp.code.publisher.CodeLayer" |
| 761 | class="lp.code.browser.branchlisting.GroupedDistributionSourcePackageBranchesView" |
| 762 | permission="zope.Public" |
| 763 | facet="branches" |
| 764 | @@ -776,6 +847,7 @@ |
| 765 | template="../templates/distributionsourcepackage-branches-grouped.pt"/> |
| 766 | <browser:page |
| 767 | for="lp.registry.interfaces.distributionsourcepackage.IDistributionSourcePackage" |
| 768 | + layer="lp.code.publisher.CodeLayer" |
| 769 | class="lp.code.browser.summary.BranchCountSummaryView" |
| 770 | facet="branches" |
| 771 | permission="zope.Public" |
| 772 | @@ -783,6 +855,7 @@ |
| 773 | template="../templates/branch-count-summary.pt"/> |
| 774 | <browser:page |
| 775 | for="lp.registry.interfaces.projectgroup.IProjectGroup" |
| 776 | + layer="lp.code.publisher.CodeLayer" |
| 777 | class="lp.code.browser.branchlisting.ProjectBranchesView" |
| 778 | facet="branches" |
| 779 | permission="zope.Public" |
| 780 | @@ -790,6 +863,7 @@ |
| 781 | template="../templates/project-branches.pt"/> |
| 782 | <browser:page |
| 783 | for="lp.registry.interfaces.projectgroup.IProjectGroup" |
| 784 | + layer="lp.code.publisher.CodeLayer" |
| 785 | class="lp.code.browser.summary.BranchCountSummaryView" |
| 786 | facet="branches" |
| 787 | permission="zope.Public" |
| 788 | @@ -809,6 +883,7 @@ |
| 789 | <browser:page |
| 790 | for="lp.registry.interfaces.person.IPerson" |
| 791 | class="lp.code.browser.branchlisting.PersonOwnedBranchesView" |
| 792 | + layer="lp.code.publisher.CodeLayer" |
| 793 | permission="zope.Public" |
| 794 | facet="branches" |
| 795 | name="+branches" |
| 796 | @@ -816,6 +891,7 @@ |
| 797 | <browser:page |
| 798 | for="lp.registry.interfaces.person.IPerson" |
| 799 | class="lp.code.browser.branchlisting.PersonOwnedBranchesView" |
| 800 | + layer="lp.code.publisher.CodeLayer" |
| 801 | permission="zope.Public" |
| 802 | facet="branches" |
| 803 | name="+ownedbranches" |
| 804 | @@ -823,12 +899,14 @@ |
| 805 | <browser:page |
| 806 | for="lp.registry.interfaces.person.IPerson" |
| 807 | class="lp.code.browser.branchlisting.PersonSubscribedBranchesView" |
| 808 | + layer="lp.code.publisher.CodeLayer" |
| 809 | permission="zope.Public" |
| 810 | facet="branches" |
| 811 | name="+subscribedbranches" |
| 812 | template="../templates/person-branches.pt"/> |
| 813 | <browser:page |
| 814 | for="lp.registry.interfaces.person.IPerson" |
| 815 | + layer="lp.code.publisher.CodeLayer" |
| 816 | class="lp.code.browser.branchlisting.PersonRegisteredBranchesView" |
| 817 | permission="zope.Public" |
| 818 | facet="branches" |
| 819 | @@ -836,6 +914,7 @@ |
| 820 | template="../templates/person-branches.pt"/> |
| 821 | <browser:page |
| 822 | for="lp.registry.interfaces.person.IPerson" |
| 823 | + layer="lp.code.publisher.CodeLayer" |
| 824 | class="lp.code.browser.branchlisting.PersonCodeSummaryView" |
| 825 | permission="zope.Public" |
| 826 | facet="branches" |
| 827 | @@ -843,6 +922,7 @@ |
| 828 | template="../templates/person-codesummary.pt"/> |
| 829 | <browser:page |
| 830 | for="lp.registry.interfaces.person.IPerson" |
| 831 | + layer="lp.code.publisher.CodeLayer" |
| 832 | class="lp.code.browser.branchmergeproposallisting.PersonActiveReviewsView" |
| 833 | permission="zope.Public" |
| 834 | facet="branches" |
| 835 | @@ -851,12 +931,14 @@ |
| 836 | <browser:page |
| 837 | name="+addbranch" |
| 838 | for="lp.registry.interfaces.person.IPerson" |
| 839 | + layer="lp.code.publisher.CodeLayer" |
| 840 | class="lp.code.browser.branch.BranchAddView" |
| 841 | facet="branches" |
| 842 | permission="launchpad.AnyPerson" |
| 843 | template="../templates/branch-add.pt"/> |
| 844 | <browser:page |
| 845 | for="lp.registry.interfaces.person.IPerson" |
| 846 | + layer="lp.code.publisher.CodeLayer" |
| 847 | class="lp.code.browser.branchlisting.PersonTeamBranchesView" |
| 848 | name="+portlet-teambranches" |
| 849 | template="../templates/person-portlet-teambranches.pt" |
| 850 | @@ -865,6 +947,7 @@ |
| 851 | |
| 852 | <browser:page |
| 853 | for="lp.registry.interfaces.product.IProduct" |
| 854 | + layer="lp.code.publisher.CodeLayer" |
| 855 | class="lp.code.browser.branchlisting.ProductBranchesView" |
| 856 | facet="branches" |
| 857 | permission="zope.Public" |
| 858 | @@ -872,6 +955,7 @@ |
| 859 | template="../templates/product-branches.pt"/> |
| 860 | <browser:page |
| 861 | for="lp.registry.interfaces.product.IProduct" |
| 862 | + layer="lp.code.publisher.CodeLayer" |
| 863 | class="lp.code.browser.branchlisting.ProductCodeIndexView" |
| 864 | facet="branches" |
| 865 | permission="zope.Public" |
| 866 | @@ -879,6 +963,7 @@ |
| 867 | template="../templates/product-branches.pt"/> |
| 868 | <browser:page |
| 869 | for="lp.registry.interfaces.product.IProduct" |
| 870 | + layer="lp.code.publisher.CodeLayer" |
| 871 | class="lp.code.browser.branchlisting.ProductCodeIndexView" |
| 872 | facet="branches" |
| 873 | permission="zope.Public" |
| 874 | @@ -886,6 +971,7 @@ |
| 875 | template="../templates/product-branch-summary.pt"/> |
| 876 | <browser:page |
| 877 | for="lp.registry.interfaces.product.IProduct" |
| 878 | + layer="lp.code.publisher.CodeLayer" |
| 879 | class="lp.code.browser.summary.BranchCountSummaryView" |
| 880 | facet="branches" |
| 881 | permission="zope.Public" |
| 882 | @@ -895,6 +981,7 @@ |
| 883 | <browser:page |
| 884 | name="+addbranch" |
| 885 | for="lp.registry.interfaces.product.IProduct" |
| 886 | + layer="lp.code.publisher.CodeLayer" |
| 887 | class="lp.code.browser.branch.BranchAddView" |
| 888 | facet="branches" |
| 889 | permission="launchpad.AnyPerson" |
| 890 | @@ -903,6 +990,7 @@ |
| 891 | <browser:page |
| 892 | name="+addbranch" |
| 893 | for="lp.registry.interfaces.productseries.IProductSeries" |
| 894 | + layer="lp.code.publisher.CodeLayer" |
| 895 | class="lp.code.browser.branch.BranchAddView" |
| 896 | facet="branches" |
| 897 | permission="launchpad.AnyPerson" |
| 898 | @@ -940,8 +1028,7 @@ |
| 899 | |
| 900 | <browser:navigation |
| 901 | module="lp.code.browser.diff" |
| 902 | - classes=" |
| 903 | - PreviewDiffNavigation"/> |
| 904 | + classes="PreviewDiffNavigation"/> |
| 905 | |
| 906 | <browser:page |
| 907 | name="+diff" |
| 908 | @@ -961,6 +1048,7 @@ |
| 909 | |
| 910 | <browser:page |
| 911 | for="lp.registry.interfaces.personproduct.IPersonProduct" |
| 912 | + layer="lp.code.publisher.CodeLayer" |
| 913 | class="lp.code.browser.branchlisting.PersonProductOwnedBranchesView" |
| 914 | permission="zope.Public" |
| 915 | facet="branches" |
| 916 | @@ -969,6 +1057,7 @@ |
| 917 | /> |
| 918 | <browser:page |
| 919 | for="lp.registry.interfaces.personproduct.IPersonProduct" |
| 920 | + layer="lp.code.publisher.CodeLayer" |
| 921 | class="lp.code.browser.branchlisting.PersonProductSubscribedBranchesView" |
| 922 | permission="zope.Public" |
| 923 | facet="branches" |
| 924 | @@ -977,6 +1066,7 @@ |
| 925 | /> |
| 926 | <browser:page |
| 927 | for="lp.registry.interfaces.personproduct.IPersonProduct" |
| 928 | + layer="lp.code.publisher.CodeLayer" |
| 929 | class="lp.code.browser.branchlisting.PersonProductRegisteredBranchesView" |
| 930 | permission="zope.Public" |
| 931 | facet="branches" |
| 932 | @@ -985,6 +1075,7 @@ |
| 933 | /> |
| 934 | <browser:page |
| 935 | for="lp.registry.interfaces.personproduct.IPersonProduct" |
| 936 | + layer="lp.code.publisher.CodeLayer" |
| 937 | class="lp.code.browser.branchmergeproposallisting.PersonProductActiveReviewsView" |
| 938 | permission="zope.Public" |
| 939 | facet="branches" |
| 940 | @@ -993,6 +1084,7 @@ |
| 941 | |
| 942 | <browser:page |
| 943 | for="lp.registry.interfaces.personproduct.IPersonProduct" |
| 944 | + layer="lp.code.publisher.CodeLayer" |
| 945 | class="lp.code.browser.branchlisting.PersonProductTeamBranchesView" |
| 946 | facet="branches" |
| 947 | name="+portlet-teambranches" |
| 948 | @@ -1002,6 +1094,7 @@ |
| 949 | |
| 950 | <browser:page |
| 951 | for="lp.registry.interfaces.personproduct.IPersonProduct" |
| 952 | + layer="lp.code.publisher.CodeLayer" |
| 953 | class="lp.code.browser.branchlisting.PersonProductCodeSummaryView" |
| 954 | facet="branches" |
| 955 | name="+codesummary" |
| 956 | @@ -1011,6 +1104,7 @@ |
| 957 | |
| 958 | <browser:page |
| 959 | for="lp.code.interfaces.hasbranches.IHasMergeProposals" |
| 960 | + layer="lp.code.publisher.CodeLayer" |
| 961 | class="lp.code.browser.branchmergeproposallisting.BranchMergeProposalListingView" |
| 962 | facet="branches" |
| 963 | permission="zope.Public" |
| 964 | @@ -1019,6 +1113,7 @@ |
| 965 | |
| 966 | <browser:page |
| 967 | for="lp.code.interfaces.hasbranches.IHasMergeProposals" |
| 968 | + layer="lp.code.publisher.CodeLayer" |
| 969 | class="lp.code.browser.branchmergeproposallisting.ActiveReviewsView" |
| 970 | permission="zope.Public" |
| 971 | facet="branches" |
| 972 | @@ -1102,12 +1197,14 @@ |
| 973 | layer="lp.code.publisher.CodeLayer"/> |
| 974 | <browser:page |
| 975 | for="lp.code.interfaces.sourcepackagerecipe.ISourcePackageRecipe" |
| 976 | + layer="lp.code.publisher.CodeLayer" |
| 977 | class="lp.code.browser.sourcepackagerecipe.SourcePackageRecipeView" |
| 978 | name="+index" |
| 979 | template="../templates/sourcepackagerecipe-index.pt" |
| 980 | permission="launchpad.View"/> |
| 981 | <browser:page |
| 982 | for="lp.code.interfaces.sourcepackagerecipe.ISourcePackageRecipe" |
| 983 | + layer="lp.code.publisher.CodeLayer" |
| 984 | class="lp.code.browser.sourcepackagerecipe.SourcePackageRecipeRequestBuildsView" |
| 985 | name="+request-builds" |
| 986 | template="../templates/sourcepackagerecipe-request-builds.pt" |
| 987 | @@ -1120,18 +1217,21 @@ |
| 988 | layer="lp.code.publisher.CodeLayer"/> |
| 989 | <browser:page |
| 990 | for="lp.code.interfaces.sourcepackagerecipebuild.ISourcePackageRecipeBuild" |
| 991 | + layer="lp.code.publisher.CodeLayer" |
| 992 | class="lp.code.browser.sourcepackagerecipebuild.SourcePackageRecipeBuildView" |
| 993 | name="+index" |
| 994 | template="../templates/sourcepackagerecipebuild-index.pt" |
| 995 | permission="launchpad.View"/> |
| 996 | <browser:page |
| 997 | for="lp.code.interfaces.sourcepackagerecipebuild.ISourcePackageRecipeBuild" |
| 998 | + layer="lp.code.publisher.CodeLayer" |
| 999 | class="lp.code.browser.sourcepackagerecipebuild.SourcePackageRecipeBuildCancelView" |
| 1000 | name="+cancel" |
| 1001 | template="../../app/templates/generic-edit.pt" |
| 1002 | permission="launchpad.Admin"/> |
| 1003 | <browser:page |
| 1004 | for="lp.code.interfaces.sourcepackagerecipebuild.ISourcePackageRecipeBuild" |
| 1005 | + layer="lp.code.publisher.CodeLayer" |
| 1006 | class="lp.code.browser.sourcepackagerecipebuild.SourcePackageRecipeBuildRescoreView" |
| 1007 | name="+rescore" |
| 1008 | template="../../app/templates/generic-edit.pt" |
| 1009 | @@ -1144,6 +1244,7 @@ |
| 1010 | |
| 1011 | <browser:page |
| 1012 | for="lp.code.interfaces.branch.IBranch" |
| 1013 | + layer="lp.code.publisher.CodeLayer" |
| 1014 | class="lp.code.browser.sourcepackagerecipe.SourcePackageRecipeAddView" |
| 1015 | permission="launchpad.AnyPerson" |
| 1016 | facet="branches" |
| 1017 | @@ -1151,6 +1252,7 @@ |
| 1018 | template="../../app/templates/generic-edit.pt"/> |
| 1019 | <browser:page |
| 1020 | for="lp.code.interfaces.sourcepackagerecipe.ISourcePackageRecipe" |
| 1021 | + layer="lp.code.publisher.CodeLayer" |
| 1022 | class="lp.code.browser.sourcepackagerecipe.SourcePackageRecipeEditView" |
| 1023 | permission="launchpad.Edit" |
| 1024 | facet="branches" |
| 1025 | @@ -1158,6 +1260,7 @@ |
| 1026 | template="../../app/templates/generic-edit.pt"/> |
| 1027 | <browser:page |
| 1028 | for="lp.code.interfaces.sourcepackagerecipe.ISourcePackageRecipe" |
| 1029 | + layer="lp.code.publisher.CodeLayer" |
| 1030 | class="lp.code.browser.sourcepackagerecipe.SourcePackageRecipeDeleteView" |
| 1031 | permission="launchpad.Edit" |
| 1032 | facet="branches" |
| 1033 | @@ -1166,6 +1269,7 @@ |
| 1034 | |
| 1035 | <browser:page |
| 1036 | for="lp.code.interfaces.branch.IBranch" |
| 1037 | + layer="lp.code.publisher.CodeLayer" |
| 1038 | class="lp.code.browser.sourcepackagerecipelisting.BranchRecipeListingView" |
| 1039 | permission="zope.Public" |
| 1040 | facet="branches" |
| 1041 | @@ -1173,6 +1277,7 @@ |
| 1042 | template="../templates/sourcepackagerecipe-listing.pt"/> |
| 1043 | <browser:page |
| 1044 | for="lp.registry.interfaces.product.IProduct" |
| 1045 | + layer="lp.code.publisher.CodeLayer" |
| 1046 | class="lp.code.browser.sourcepackagerecipelisting.ProductRecipeListingView" |
| 1047 | permission="zope.Public" |
| 1048 | facet="branches" |
| 1049 | @@ -1180,6 +1285,7 @@ |
| 1050 | template="../templates/sourcepackagerecipe-listing.pt"/> |
| 1051 | <browser:page |
| 1052 | for="lp.registry.interfaces.person.IPerson" |
| 1053 | + layer="lp.code.publisher.CodeLayer" |
| 1054 | class="lp.code.browser.sourcepackagerecipelisting.PersonRecipeListingView" |
| 1055 | permission="zope.Public" |
| 1056 | facet="branches" |
| 1057 | @@ -1188,6 +1294,7 @@ |
| 1058 | |
| 1059 | <browser:page |
| 1060 | for="lp.code.interfaces.sourcepackagerecipe.ISourcePackageRecipe" |
| 1061 | + layer="lp.code.publisher.CodeLayer" |
| 1062 | name="+hierarchy" |
| 1063 | class="lp.code.browser.sourcepackagerecipe.SourcePackageRecipeHierarchy" |
| 1064 | template="../../app/templates/launchpad-hierarchy.pt" |
| 1065 | |
| 1066 | === modified file 'lib/lp/code/browser/sourcepackagerecipe.py' |
| 1067 | --- lib/lp/code/browser/sourcepackagerecipe.py 2010-08-20 20:31:18 +0000 |
| 1068 | +++ lib/lp/code/browser/sourcepackagerecipe.py 2010-08-24 02:26:48 +0000 |
| 1069 | @@ -94,7 +94,8 @@ |
| 1070 | |
| 1071 | @property |
| 1072 | def url(self): |
| 1073 | - return canonical_url(self.context, view_name="+recipes") |
| 1074 | + return canonical_url( |
| 1075 | + self.context, view_name="+recipes", rootsite='code') |
| 1076 | |
| 1077 | |
| 1078 | class SourcePackageRecipeHierarchy(Hierarchy): |
| 1079 | |
| 1080 | === modified file 'lib/lp/code/browser/sourcepackagerecipelisting.py' |
| 1081 | --- lib/lp/code/browser/sourcepackagerecipelisting.py 2010-08-20 20:31:18 +0000 |
| 1082 | +++ lib/lp/code/browser/sourcepackagerecipelisting.py 2010-08-24 02:26:48 +0000 |
| 1083 | @@ -35,7 +35,7 @@ |
| 1084 | if not config.build_from_branch.enabled: |
| 1085 | enabled = False |
| 1086 | return Link( |
| 1087 | - '+recipes', text, icon='info', enabled=enabled) |
| 1088 | + '+recipes', text, icon='info', enabled=enabled, site='code') |
| 1089 | |
| 1090 | |
| 1091 | class RecipeListingView(LaunchpadView, FeedsMixin): |
| 1092 | |
| 1093 | === modified file 'lib/lp/code/browser/tests/test_branchlisting.py' |
| 1094 | --- lib/lp/code/browser/tests/test_branchlisting.py 2010-08-20 20:31:18 +0000 |
| 1095 | +++ lib/lp/code/browser/tests/test_branchlisting.py 2010-08-24 02:26:48 +0000 |
| 1096 | @@ -141,7 +141,8 @@ |
| 1097 | # the current batch. |
| 1098 | branch_ids = set([self.branches[0].id]) |
| 1099 | |
| 1100 | - view = create_initialized_view(self.barney, name="+branches") |
| 1101 | + view = create_initialized_view( |
| 1102 | + self.barney, name="+branches", rootsite='code') |
| 1103 | self.assertEqual( |
| 1104 | view.branches().branch_ids_with_bug_links, |
| 1105 | branch_ids) |
| 1106 | @@ -151,7 +152,8 @@ |
| 1107 | # the current batch. |
| 1108 | branch_ids = set([self.branches[1].id]) |
| 1109 | |
| 1110 | - view = create_initialized_view(self.barney, name="+branches") |
| 1111 | + view = create_initialized_view( |
| 1112 | + self.barney, name="+branches", rootsite='code') |
| 1113 | self.assertEqual( |
| 1114 | view.branches().branch_ids_with_spec_links, |
| 1115 | branch_ids) |
| 1116 | @@ -160,7 +162,8 @@ |
| 1117 | # _branches_for_current_batch should return a list of all branches in |
| 1118 | # the current batch. |
| 1119 | branch_ids = set([]) |
| 1120 | - view = create_initialized_view(self.barney, name="+branches") |
| 1121 | + view = create_initialized_view( |
| 1122 | + self.barney, name="+branches", rootsite='code') |
| 1123 | self.assertEqual( |
| 1124 | view.branches().branch_ids_with_merge_proposals, |
| 1125 | branch_ids) |
| 1126 | @@ -173,7 +176,8 @@ |
| 1127 | for branch_id in branch_ids: |
| 1128 | tip_revisions[branch_id] = None |
| 1129 | |
| 1130 | - view = create_initialized_view(self.barney, name="+branches") |
| 1131 | + view = create_initialized_view( |
| 1132 | + self.barney, name="+branches", rootsite='code') |
| 1133 | self.assertEqual( |
| 1134 | view.branches().tip_revisions, |
| 1135 | tip_revisions) |
| 1136 | @@ -351,7 +355,8 @@ |
| 1137 | branch.distribution.name, branch.sourcepackagename.name) |
| 1138 | self.assertEqual(identity, branch.bzr_identity) |
| 1139 | # Now confirm that we get the same through the view. |
| 1140 | - view = create_initialized_view(branch.distribution, name='+branches') |
| 1141 | + view = create_initialized_view( |
| 1142 | + branch.distribution, name='+branches', rootsite='code') |
| 1143 | # There is only one branch. |
| 1144 | batch = view.branches() |
| 1145 | [view_branch] = batch.branches |
| 1146 | |
| 1147 | === modified file 'lib/lp/code/browser/tests/test_branchmergeproposal.py' |
| 1148 | --- lib/lp/code/browser/tests/test_branchmergeproposal.py 2010-08-20 20:31:18 +0000 |
| 1149 | +++ lib/lp/code/browser/tests/test_branchmergeproposal.py 2010-08-24 02:26:48 +0000 |
| 1150 | @@ -60,11 +60,6 @@ |
| 1151 | |
| 1152 | layer = DatabaseFunctionalLayer |
| 1153 | |
| 1154 | - def setUp(self): |
| 1155 | - # Use an admin so we don't have to worry about launchpad.Edit |
| 1156 | - # permissions on the merge proposals. |
| 1157 | - TestCaseWithFactory.setUp(self, user="admin@canonical.com") |
| 1158 | - |
| 1159 | def testPrimaryContext(self): |
| 1160 | # The primary context of a merge proposal is the same as the primary |
| 1161 | # context of the source_branch. |
| 1162 | @@ -84,7 +79,6 @@ |
| 1163 | set_state=BranchMergeProposalStatus.REJECTED) |
| 1164 | login_person(bmp.registrant) |
| 1165 | menu = BranchMergeProposalContextMenu(bmp) |
| 1166 | - link = menu.add_comment() |
| 1167 | self.assertTrue(menu.add_comment().enabled) |
| 1168 | |
| 1169 | |
| 1170 | @@ -272,9 +266,6 @@ |
| 1171 | albert = self.factory.makePerson(name='albert') |
| 1172 | bob = self.factory.makePerson(name='bob') |
| 1173 | charles = self.factory.makePerson(name='charles') |
| 1174 | - |
| 1175 | - owner = self.bmp.source_branch.owner |
| 1176 | - |
| 1177 | self._createComment(albert, CodeReviewVote.APPROVE) |
| 1178 | self._createComment(bob, CodeReviewVote.ABSTAIN) |
| 1179 | self._createComment(charles, CodeReviewVote.DISAPPROVE) |
| 1180 | @@ -290,9 +281,6 @@ |
| 1181 | # Request three reviews. |
| 1182 | albert = self.factory.makePerson(name='albert') |
| 1183 | bob = self.factory.makePerson(name='bob') |
| 1184 | - |
| 1185 | - owner = self.bmp.source_branch.owner |
| 1186 | - |
| 1187 | self._createComment(albert, CodeReviewVote.ABSTAIN) |
| 1188 | self._createComment(bob, CodeReviewVote.APPROVE) |
| 1189 | self._createComment(albert, CodeReviewVote.APPROVE) |
| 1190 | @@ -305,7 +293,6 @@ |
| 1191 | |
| 1192 | def addReviewTeam(self): |
| 1193 | review_team = self.factory.makeTeam(name='reviewteam') |
| 1194 | - target_branch = self.factory.makeAnyBranch() |
| 1195 | self.bmp.target_branch.reviewer = review_team |
| 1196 | |
| 1197 | def test_review_team_members_trusted(self): |
| 1198 | |
| 1199 | === modified file 'lib/lp/code/browser/tests/test_branchmergeproposallisting.py' |
| 1200 | --- lib/lp/code/browser/tests/test_branchmergeproposallisting.py 2010-08-20 20:31:18 +0000 |
| 1201 | +++ lib/lp/code/browser/tests/test_branchmergeproposallisting.py 2010-08-24 02:26:48 +0000 |
| 1202 | @@ -335,7 +335,8 @@ |
| 1203 | login_person(bmp3.source_branch.owner) |
| 1204 | bmp3.requestReview(datetime(2009,1,1,tzinfo=pytz.UTC)) |
| 1205 | login(ANONYMOUS) |
| 1206 | - view = create_initialized_view(product, name='+activereviews') |
| 1207 | + view = create_initialized_view( |
| 1208 | + product, name='+activereviews', rootsite='code') |
| 1209 | self.assertEqual( |
| 1210 | [bmp3, bmp2, bmp1], |
| 1211 | [item.context for item in view.review_groups[view.OTHER]]) |
| 1212 | |
| 1213 | === modified file 'lib/lp/code/browser/tests/test_product.py' |
| 1214 | --- lib/lp/code/browser/tests/test_product.py 2010-08-20 20:31:18 +0000 |
| 1215 | +++ lib/lp/code/browser/tests/test_product.py 2010-08-24 02:26:48 +0000 |
| 1216 | @@ -29,6 +29,7 @@ |
| 1217 | TestCaseWithFactory, |
| 1218 | time_counter, |
| 1219 | ) |
| 1220 | +from lp.testing.views import create_initialized_view |
| 1221 | |
| 1222 | |
| 1223 | class TestProductCodeIndexView(TestCaseWithFactory): |
| 1224 | @@ -53,7 +54,6 @@ |
| 1225 | |
| 1226 | :raises Something: if the branch is not found. |
| 1227 | """ |
| 1228 | - url = canonical_url(product, rootsite='code') |
| 1229 | browser = self.getUserBrowser(canonical_url(product, rootsite='code')) |
| 1230 | return browser.getLink('browse the source code') |
| 1231 | |
| 1232 | @@ -92,30 +92,25 @@ |
| 1233 | # +code-index page. |
| 1234 | product, branch = self.makeProductAndDevelopmentFocusBranch( |
| 1235 | private=True) |
| 1236 | - url = canonical_url(product, rootsite='code') |
| 1237 | self.factory.makeProductBranch(product=product) |
| 1238 | # This is just "assertNotRaises" |
| 1239 | self.getUserBrowser(canonical_url(product, rootsite='code')) |
| 1240 | |
| 1241 | def test_initial_branches_contains_dev_focus_branch(self): |
| 1242 | product, branch = self.makeProductAndDevelopmentFocusBranch() |
| 1243 | - view = getMultiAdapter( |
| 1244 | - (product, LaunchpadTestRequest()), name='+code-index') |
| 1245 | - view.initialize() |
| 1246 | + view = create_initialized_view(product, '+code-index', rootsite='code') |
| 1247 | self.assertIn(branch, view.initial_branches) |
| 1248 | |
| 1249 | def test_initial_branches_does_not_contain_private_dev_focus_branch(self): |
| 1250 | product, branch = self.makeProductAndDevelopmentFocusBranch( |
| 1251 | private=True) |
| 1252 | - view = getMultiAdapter( |
| 1253 | - (product, LaunchpadTestRequest()), name='+code-index') |
| 1254 | - view.initialize() |
| 1255 | + view = create_initialized_view(product, '+code-index', rootsite='code') |
| 1256 | self.assertNotIn(branch, view.initial_branches) |
| 1257 | |
| 1258 | def test_committer_count_with_revision_authors(self): |
| 1259 | # Test that the code pathing for calling committer_count with |
| 1260 | # valid revision authors is truly tested. |
| 1261 | - cthulu = self.factory.makePerson(email='cthulu@example.com') |
| 1262 | + self.factory.makePerson(email='cthulu@example.com') |
| 1263 | product, branch = self.makeProductAndDevelopmentFocusBranch() |
| 1264 | date_generator = time_counter( |
| 1265 | datetime.now(pytz.UTC) - timedelta(days=30), |
| 1266 | @@ -125,9 +120,7 @@ |
| 1267 | date_generator=date_generator) |
| 1268 | getUtility(IRevisionSet).updateRevisionCacheForBranch(branch) |
| 1269 | |
| 1270 | - view = getMultiAdapter( |
| 1271 | - (product, LaunchpadTestRequest()), name='+code-index') |
| 1272 | - view.initialize() |
| 1273 | + view = create_initialized_view(product, '+code-index', rootsite='code') |
| 1274 | self.assertEqual(view.committer_count, 1) |
| 1275 | |
| 1276 | def test_committers_count_private_branch(self): |
| 1277 | @@ -145,9 +138,7 @@ |
| 1278 | date_generator=date_generator) |
| 1279 | getUtility(IRevisionSet).updateRevisionCacheForBranch(branch) |
| 1280 | |
| 1281 | - view = getMultiAdapter( |
| 1282 | - (product, LaunchpadTestRequest()), name='+code-index') |
| 1283 | - view.initialize() |
| 1284 | + view = create_initialized_view(product, '+code-index', rootsite='code') |
| 1285 | self.assertEqual(view.committer_count, 1) |
| 1286 | |
| 1287 | |
| 1288 | |
| 1289 | === modified file 'lib/lp/code/stories/branches/xx-branch-edit.txt' |
| 1290 | --- lib/lp/code/stories/branches/xx-branch-edit.txt 2010-05-30 04:06:48 +0000 |
| 1291 | +++ lib/lp/code/stories/branches/xx-branch-edit.txt 2010-08-24 02:26:48 +0000 |
| 1292 | @@ -17,26 +17,26 @@ |
| 1293 | Launchpad administrators or members of the Bazaar Experts team. |
| 1294 | |
| 1295 | >>> admin_browser.open( |
| 1296 | - ... 'http://launchpad.dev/~name12/gnome-terminal/klingon') |
| 1297 | + ... 'http://code.launchpad.dev/~name12/gnome-terminal/klingon') |
| 1298 | >>> link = admin_browser.getLink('Change branch details') |
| 1299 | |
| 1300 | >>> bazaar_expert_browser = setupBrowser( |
| 1301 | ... auth='Basic tim@canonical.com:test') |
| 1302 | >>> bazaar_expert_browser.open( |
| 1303 | - ... 'http://launchpad.dev/~name12/gnome-terminal/klingon') |
| 1304 | + ... 'http://code.launchpad.dev/~name12/gnome-terminal/klingon') |
| 1305 | >>> link = bazaar_expert_browser.getLink('Change branch details') |
| 1306 | |
| 1307 | >>> nopriv_browser = setupBrowser( |
| 1308 | ... auth='Basic nopriv@canonical.com:test') |
| 1309 | >>> nopriv_browser.open( |
| 1310 | - ... 'http://launchpad.dev/~name12/gnome-terminal/klingon') |
| 1311 | + ... 'http://code.launchpad.dev/~name12/gnome-terminal/klingon') |
| 1312 | >>> link = nopriv_browser.getLink('Change branch details') |
| 1313 | Traceback (most recent call last): |
| 1314 | LinkNotFoundError |
| 1315 | |
| 1316 | >>> browser = setupBrowser(auth='Basic test@canonical.com:test') |
| 1317 | >>> browser.open( |
| 1318 | - ... 'http://launchpad.dev/~name12/gnome-terminal/klingon') |
| 1319 | + ... 'http://code.launchpad.dev/~name12/gnome-terminal/klingon') |
| 1320 | >>> browser.getLink('Change branch details').click() |
| 1321 | >>> browser.url |
| 1322 | 'http://code.launchpad.dev/~name12/gnome-terminal/klingon/+edit' |
| 1323 | @@ -84,7 +84,7 @@ |
| 1324 | |
| 1325 | To change the branch status, the +edit page is also used: |
| 1326 | |
| 1327 | - >>> browser.open('http://launchpad.dev' |
| 1328 | + >>> browser.open('http://code.launchpad.dev' |
| 1329 | ... '/~name12/gnome-terminal/klingon/+edit') |
| 1330 | |
| 1331 | The form displays the branch current status. |
| 1332 | @@ -112,7 +112,7 @@ |
| 1333 | |
| 1334 | Set the branch status back to its initial state. |
| 1335 | |
| 1336 | - >>> browser.open('http://launchpad.dev' |
| 1337 | + >>> browser.open('http://code.launchpad.dev' |
| 1338 | ... '/~name12/gnome-terminal/klingon/+edit') |
| 1339 | >>> browser.getControl('Experimental').click() |
| 1340 | >>> browser.getControl('Change Branch').click() |
| 1341 | @@ -162,12 +162,12 @@ |
| 1342 | Let's try to change the name of the branch to the name of some branch we |
| 1343 | already own in the same product. |
| 1344 | |
| 1345 | - >>> browser.open('http://launchpad.dev' |
| 1346 | + >>> browser.open('http://code.launchpad.dev' |
| 1347 | ... '/~name12/gnome-terminal/main/+edit') |
| 1348 | >>> browser.getControl('Name').value = '2.6' |
| 1349 | >>> browser.getControl('Change Branch').click() |
| 1350 | >>> browser.url |
| 1351 | - 'http://launchpad.dev/%7Ename12/gnome-terminal/main/+edit' |
| 1352 | + 'http://code.launchpad.dev/%7Ename12/gnome-terminal/main/+edit' |
| 1353 | >>> for msg in get_feedback_messages(browser.contents): |
| 1354 | ... print msg |
| 1355 | There is 1 error. |
| 1356 | @@ -178,7 +178,7 @@ |
| 1357 | |
| 1358 | Edit forms do the same URL validation checks as the add forms. |
| 1359 | |
| 1360 | - >>> browser.open('http://launchpad.dev/~name12/gnome-terminal/main') |
| 1361 | + >>> browser.open('http://code.launchpad.dev/~name12/gnome-terminal/main') |
| 1362 | >>> browser.getLink('Change branch details').click() |
| 1363 | >>> browser.getControl('Branch URL').value = ( |
| 1364 | ... 'http://bazaar.launchpad.dev/~foo/bar/baz') |
| 1365 | @@ -192,7 +192,8 @@ |
| 1366 | |
| 1367 | Check that when editing a hosted branch the URL field is not shown. |
| 1368 | |
| 1369 | - >>> browser.open('http://launchpad.dev/~name12/gnome-terminal/scanned') |
| 1370 | + >>> browser.open( |
| 1371 | + ... 'http://code.launchpad.dev/~name12/gnome-terminal/scanned') |
| 1372 | >>> browser.getLink('Change branch details').click() |
| 1373 | >>> browser.getControl('Branch URL').value = ( |
| 1374 | ... 'http://acme.example.com/~foo/bar/baz') |
| 1375 | @@ -227,7 +228,7 @@ |
| 1376 | >>> logout() |
| 1377 | |
| 1378 | >>> nopriv_browser = setupBrowser(auth='Basic no-priv@canonical.com:test') |
| 1379 | - >>> nopriv_browser.open('http://launchpad.dev' |
| 1380 | + >>> nopriv_browser.open('http://code.launchpad.dev' |
| 1381 | ... '/~name12/foogoo/foogoo-svn') |
| 1382 | >>> whiteboard_tag = find_tag_by_id( |
| 1383 | ... nopriv_browser.contents, 'branch-whiteboard-value') |
| 1384 | @@ -280,7 +281,7 @@ |
| 1385 | The user is able to change the owner of the branch using the edit details |
| 1386 | page. |
| 1387 | |
| 1388 | - >>> browser.open('http://launchpad.dev/~name12/gnome-terminal/main') |
| 1389 | + >>> browser.open('http://code.launchpad.dev/~name12/gnome-terminal/main') |
| 1390 | >>> browser.getLink('Change branch details').click() |
| 1391 | >>> browser.getControl('Owner').displayValue = ['Landscape Developers'] |
| 1392 | >>> browser.getControl('Change Branch').click() |
| 1393 | @@ -297,7 +298,7 @@ |
| 1394 | Bazaar Experts and Launchpad administrators are able to reassign a branch |
| 1395 | to any valid person or team. |
| 1396 | |
| 1397 | - >>> admin_browser.open('http://launchpad.dev/~name12/firefox/main') |
| 1398 | + >>> admin_browser.open('http://code.launchpad.dev/~name12/firefox/main') |
| 1399 | >>> admin_browser.getLink('Change branch details').click() |
| 1400 | >>> admin_browser.getControl('Owner').value = 'mark' |
| 1401 | >>> admin_browser.getControl('Change Branch').click() |
| 1402 | |
| 1403 | === modified file 'lib/lp/code/stories/branches/xx-branch-listings.txt' |
| 1404 | --- lib/lp/code/stories/branches/xx-branch-listings.txt 2010-04-11 22:45:09 +0000 |
| 1405 | +++ lib/lp/code/stories/branches/xx-branch-listings.txt 2010-08-24 02:26:48 +0000 |
| 1406 | @@ -154,7 +154,7 @@ |
| 1407 | status value, it will default to current branches. |
| 1408 | |
| 1409 | >>> browser.open( |
| 1410 | - ... 'http://launchpad.dev/~name12/+branches?field.lifecycle=Fubar') |
| 1411 | + ... 'http://code.launchpad.dev/~name12/+branches?field.lifecycle=Fubar') |
| 1412 | >>> browser.getControl(name='field.lifecycle').displayValue |
| 1413 | ['Any active status'] |
| 1414 | >>> table = find_tag_by_id(browser.contents, 'branchtable') |
| 1415 | |
| 1416 | === modified file 'lib/lp/code/stories/branches/xx-branch-url-validation.txt' |
| 1417 | --- lib/lp/code/stories/branches/xx-branch-url-validation.txt 2009-06-02 08:20:49 +0000 |
| 1418 | +++ lib/lp/code/stories/branches/xx-branch-url-validation.txt 2010-08-24 02:26:48 +0000 |
| 1419 | @@ -3,7 +3,8 @@ |
| 1420 | First, let's define a helper to post to the Person +addbranch form. |
| 1421 | |
| 1422 | >>> def add_branch(url): |
| 1423 | - ... user_browser.open('http://launchpad.dev/~lifeless/+addbranch') |
| 1424 | + ... user_browser.open( |
| 1425 | + ... 'http://code.launchpad.dev/~lifeless/+addbranch') |
| 1426 | ... user_browser.getControl('Name').value = 'pyresources' |
| 1427 | ... user_browser.getControl('Branch URL').value = url |
| 1428 | ... user_browser.getControl('Register Branch').click() |
| 1429 | @@ -57,7 +58,7 @@ |
| 1430 | There is 1 error. |
| 1431 | Branch URLs are required for Mirrored branches. |
| 1432 | |
| 1433 | -Try to create a branch using the bzr+ssh URL scheme. Bug 76854 (see also 5573) |
| 1434 | +Try to create a branch using the bzr+ssh URL scheme. |
| 1435 | |
| 1436 | >>> add_branch('bzr+ssh://example.com/code/branch') |
| 1437 | >>> print user_browser.url |
| 1438 | |
| 1439 | === modified file 'lib/lp/code/stories/branches/xx-creating-branches.txt' |
| 1440 | --- lib/lp/code/stories/branches/xx-creating-branches.txt 2010-05-13 16:22:19 +0000 |
| 1441 | +++ lib/lp/code/stories/branches/xx-creating-branches.txt 2010-08-24 02:26:48 +0000 |
| 1442 | @@ -125,7 +125,7 @@ |
| 1443 | |
| 1444 | Now, post the branch creation form for the product. |
| 1445 | |
| 1446 | - >>> user_browser.open('http://launchpad.dev/applets/+addbranch') |
| 1447 | + >>> user_browser.open('http://code.launchpad.dev/applets/+addbranch') |
| 1448 | |
| 1449 | The specified URL has a trailing slash. In the next test, we will check that it |
| 1450 | has been stripped. |
| 1451 | @@ -175,7 +175,7 @@ |
| 1452 | >>> browser.open('http://launchpad.dev/gnome-terminal/trunk') |
| 1453 | >>> browser.getLink('registering a mirrored branch').click() |
| 1454 | >>> print browser.title |
| 1455 | - Register a branch : GNOME Terminal |
| 1456 | + Register a branch : Code : GNOME Terminal |
| 1457 | |
| 1458 | The user sees that he is registering a branch for the series' project. |
| 1459 | |
| 1460 | @@ -241,7 +241,7 @@ |
| 1461 | |
| 1462 | Try a adding a conflicting branch from the product/+addbranch form. |
| 1463 | |
| 1464 | - >>> browser.open('http://launchpad.dev/gnome-terminal/+addbranch') |
| 1465 | + >>> browser.open('http://code.launchpad.dev/gnome-terminal/+addbranch') |
| 1466 | >>> browser.getControl('Branch URL').value = ( |
| 1467 | ... 'http://example.com/gnome-terminal/main-dup') |
| 1468 | |
| 1469 | @@ -249,7 +249,7 @@ |
| 1470 | |
| 1471 | >>> browser.getControl('Register Branch').click() |
| 1472 | >>> browser.url |
| 1473 | - 'http://launchpad.dev/gnome-terminal/+addbranch' |
| 1474 | + 'http://code.launchpad.dev/gnome-terminal/+addbranch' |
| 1475 | |
| 1476 | Now, complete the form, but give a name that is alredy in use for that owner |
| 1477 | and product. |
| 1478 | @@ -260,7 +260,7 @@ |
| 1479 | That should give us the form back with an error message. |
| 1480 | |
| 1481 | >>> browser.url |
| 1482 | - 'http://launchpad.dev/gnome-terminal/+addbranch' |
| 1483 | + 'http://code.launchpad.dev/gnome-terminal/+addbranch' |
| 1484 | >>> for message in get_feedback_messages(browser.contents): |
| 1485 | ... print extract_text(message) |
| 1486 | There is 1 error. |
| 1487 | @@ -269,7 +269,7 @@ |
| 1488 | If the user is trying to add a branch for a team that conflicts, |
| 1489 | then the team name is given in the error message. |
| 1490 | |
| 1491 | - >>> browser.open('http://launchpad.dev/gnome-terminal/+addbranch') |
| 1492 | + >>> browser.open('http://code.launchpad.dev/gnome-terminal/+addbranch') |
| 1493 | >>> browser.getControl('Owner').displayValue = [ |
| 1494 | ... 'Landscape Developers'] |
| 1495 | >>> browser.getControl('Name').value = 'main' |
| 1496 | @@ -282,7 +282,7 @@ |
| 1497 | |
| 1498 | Now registering again with the same name. |
| 1499 | |
| 1500 | - >>> browser.open('http://launchpad.dev/gnome-terminal/+addbranch') |
| 1501 | + >>> browser.open('http://code.launchpad.dev/gnome-terminal/+addbranch') |
| 1502 | >>> browser.getControl('Owner').displayValue = [ |
| 1503 | ... 'Landscape Developers'] |
| 1504 | >>> browser.getControl('Name').value = 'main' |
| 1505 | |
| 1506 | === modified file 'lib/lp/code/stories/branches/xx-source-package-branches-listing.txt' |
| 1507 | --- lib/lp/code/stories/branches/xx-source-package-branches-listing.txt 2010-04-12 16:02:18 +0000 |
| 1508 | +++ lib/lp/code/stories/branches/xx-source-package-branches-listing.txt 2010-08-24 02:26:48 +0000 |
| 1509 | @@ -60,7 +60,7 @@ |
| 1510 | ... distribution=distro, sourcepackagename=branch1.sourcepackagename) |
| 1511 | >>> transaction.commit() |
| 1512 | >>> distro_source_package_listing = canonical_url( |
| 1513 | - ... distro_source_package, view_name="+branches") |
| 1514 | + ... distro_source_package, view_name="+branches", rootsite='code') |
| 1515 | >>> logout() |
| 1516 | |
| 1517 | >>> browser.open(distro_source_package_listing) |
| 1518 | |
| 1519 | === modified file 'lib/lp/code/stories/branches/xx-subscribing-branches.txt' |
| 1520 | --- lib/lp/code/stories/branches/xx-subscribing-branches.txt 2010-05-27 04:44:39 +0000 |
| 1521 | +++ lib/lp/code/stories/branches/xx-subscribing-branches.txt 2010-08-24 02:26:48 +0000 |
| 1522 | @@ -36,7 +36,7 @@ |
| 1523 | link "Subscribe" from a branch's page. |
| 1524 | |
| 1525 | >>> browser = setupBrowser(auth='Basic no-priv@canonical.com:test') |
| 1526 | - >>> browser.open('http://launchpad.dev/~name12/gnome-terminal/main') |
| 1527 | + >>> browser.open('http://code.launchpad.dev/~name12/gnome-terminal/main') |
| 1528 | |
| 1529 | Initially there should be no subscribers. |
| 1530 | |
| 1531 | @@ -149,7 +149,7 @@ |
| 1532 | |
| 1533 | Any logged in user is able to subscribe others to a branch. |
| 1534 | |
| 1535 | - >>> browser.open('http://launchpad.dev/~name12/gnome-terminal/main') |
| 1536 | + >>> browser.open('http://code.launchpad.dev/~name12/gnome-terminal/main') |
| 1537 | >>> browser.getLink('Subscribe someone else').click() |
| 1538 | |
| 1539 | The process of subscribing others is the same as subscribing the |
| 1540 | |
| 1541 | === modified file 'lib/lp/code/stories/sourcepackagerecipes/xx-recipe-listings.txt' |
| 1542 | --- lib/lp/code/stories/sourcepackagerecipes/xx-recipe-listings.txt 2010-06-15 19:53:21 +0000 |
| 1543 | +++ lib/lp/code/stories/sourcepackagerecipes/xx-recipe-listings.txt 2010-08-24 02:26:48 +0000 |
| 1544 | @@ -86,7 +86,7 @@ |
| 1545 | >>> nopriv_browser.open(product_url) |
| 1546 | >>> nopriv_browser.getLink('View source package recipes').click() |
| 1547 | >>> print nopriv_browser.url |
| 1548 | - http://launchpad.dev/product-name.../+recipes |
| 1549 | + http://code.launchpad.dev/product-name.../+recipes |
| 1550 | |
| 1551 | >>> print_recipe_listing_head(nopriv_browser) |
| 1552 | Name |
| 1553 | @@ -119,7 +119,7 @@ |
| 1554 | >>> nopriv_browser.open(person_url) |
| 1555 | >>> nopriv_browser.getLink('View source package recipes').click() |
| 1556 | >>> print nopriv_browser.url |
| 1557 | - http://launchpad.dev/~person-name.../+recipes |
| 1558 | + http://code.launchpad.dev/~person-name.../+recipes |
| 1559 | |
| 1560 | The "Owner" section should be missing. |
| 1561 | |
| 1562 | |
| 1563 | === modified file 'lib/lp/code/templates/branch-summary-listing.pt' |
| 1564 | --- lib/lp/code/templates/branch-summary-listing.pt 2009-07-17 17:59:07 +0000 |
| 1565 | +++ lib/lp/code/templates/branch-summary-listing.pt 2010-08-24 02:26:48 +0000 |
| 1566 | @@ -4,10 +4,10 @@ |
| 1567 | tal:content="context/bzr_identity" |
| 1568 | class="sprite branch" >Mozilla Thunderbird 0.9.1</a> |
| 1569 | <tal:person-link condition="view/show_person_link"> |
| 1570 | - - <a tal:replace="structure context/owner/fmt:link/+ownedbranches" /> |
| 1571 | + - <a tal:replace="structure context/owner/fmt:link:code/+ownedbranches" /> |
| 1572 | </tal:person-link> |
| 1573 | <tal:product-link condition="view/show_product_link"> |
| 1574 | - - <a tal:attributes="href string:${context/product/fmt:url}/+branches" |
| 1575 | + - <a tal:attributes="href context/product/fmt:url:code/+branches" |
| 1576 | tal:content="context/product/displayname" |
| 1577 | class="sprite product">Project</a> |
| 1578 | </tal:product-link> |
| 1579 | |
| 1580 | === modified file 'lib/lp/code/templates/distributionsourcepackage-branches-grouped.pt' |
| 1581 | --- lib/lp/code/templates/distributionsourcepackage-branches-grouped.pt 2009-09-17 02:17:15 +0000 |
| 1582 | +++ lib/lp/code/templates/distributionsourcepackage-branches-grouped.pt 2010-08-24 02:26:48 +0000 |
| 1583 | @@ -85,7 +85,7 @@ |
| 1584 | </li> |
| 1585 | </tal:series-branches> |
| 1586 | </tal:distro-series> |
| 1587 | - <li><a tal:attributes="href context/fmt:url/+branches"> |
| 1588 | + <li><a tal:attributes="href context/fmt:url:code/+branches"> |
| 1589 | All branches for the <tal:name replace="context/title"/> |
| 1590 | </a></li> |
| 1591 | </ul> |
| 1592 | |
| 1593 | === modified file 'lib/lp/registry/browser/product.py' |
| 1594 | --- lib/lp/registry/browser/product.py 2010-08-23 03:25:20 +0000 |
| 1595 | +++ lib/lp/registry/browser/product.py 2010-08-24 02:26:48 +0000 |
| 1596 | @@ -671,7 +671,7 @@ |
| 1597 | def branch_add(self): |
| 1598 | text = 'Register a branch' |
| 1599 | summary = "Register a new Bazaar branch for this project" |
| 1600 | - return Link('+addbranch', text, summary, icon='add') |
| 1601 | + return Link('+addbranch', text, summary, icon='add', site='code') |
| 1602 | |
| 1603 | |
| 1604 | class ProductBugsMenu(PillarBugsMenu, |
| 1605 | |
| 1606 | === modified file 'lib/lp/registry/browser/productseries.py' |
| 1607 | --- lib/lp/registry/browser/productseries.py 2010-08-20 20:31:18 +0000 |
| 1608 | +++ lib/lp/registry/browser/productseries.py 2010-08-24 02:26:48 +0000 |
| 1609 | @@ -428,7 +428,8 @@ |
| 1610 | @property |
| 1611 | def request_import_link(self): |
| 1612 | """A link to the page for requesting a new code import.""" |
| 1613 | - return canonical_url(self.context.product, view_name='+new-import') |
| 1614 | + return canonical_url( |
| 1615 | + self.context.product, view_name='+new-import', rootsite='code') |
| 1616 | |
| 1617 | @property |
| 1618 | def user_branch_visible(self): |
| 1619 | |
| 1620 | === modified file 'lib/lp/registry/browser/tests/productseries-views.txt' |
| 1621 | --- lib/lp/registry/browser/tests/productseries-views.txt 2010-07-30 20:00:59 +0000 |
| 1622 | +++ lib/lp/registry/browser/tests/productseries-views.txt 2010-08-24 02:26:48 +0000 |
| 1623 | @@ -158,7 +158,7 @@ |
| 1624 | The view also provides a link to register a new code import. |
| 1625 | |
| 1626 | >>> print view.request_import_link |
| 1627 | - http://launchpad.dev/firefox/+new-import |
| 1628 | + http://code.launchpad.dev/firefox/+new-import |
| 1629 | |
| 1630 | |
| 1631 | Edit ProductSeries |
| 1632 | |
| 1633 | === modified file 'lib/lp/registry/stories/productseries/xx-productseries-link-branch.txt' |
| 1634 | --- lib/lp/registry/stories/productseries/xx-productseries-link-branch.txt 2009-10-06 21:58:56 +0000 |
| 1635 | +++ lib/lp/registry/stories/productseries/xx-productseries-link-branch.txt 2010-08-24 02:26:48 +0000 |
| 1636 | @@ -61,7 +61,7 @@ |
| 1637 | |
| 1638 | >>> revisions = find_tag_by_id(sample_browser.contents, 'branch-revision-details') |
| 1639 | >>> print extract_text(revisions) |
| 1640 | - 15 revisions, 5 in the past month. |
| 1641 | + 15 revisions. |
| 1642 | |
| 1643 | A helpful informational message is also shown to the user. |
| 1644 | |
| 1645 | |
| 1646 | === modified file 'lib/lp/registry/templates/productseries-codesummary.pt' |
| 1647 | --- lib/lp/registry/templates/productseries-codesummary.pt 2010-04-12 23:10:39 +0000 |
| 1648 | +++ lib/lp/registry/templates/productseries-codesummary.pt 2010-08-24 02:26:48 +0000 |
| 1649 | @@ -84,13 +84,12 @@ |
| 1650 | <a id="series-branch" class="sprite branch" |
| 1651 | tal:attributes="href context/branch/fmt:url" |
| 1652 | tal:content="context/branch/bzr_identity">Mozilla Thunderbird 0.9.1</a> |
| 1653 | - - <a tal:replace="structure context/branch/owner/fmt:link/+ownedbranches" /> |
| 1654 | + - <a tal:replace="structure context/branch/owner/fmt:link:code/+ownedbranches" /> |
| 1655 | <a |
| 1656 | tal:replace="structure context/menu:overview/link_branch/fmt:icon" /> |
| 1657 | </div> |
| 1658 | <div id="branch-revision-details" tal:condition="context/branch/revision_count"> |
| 1659 | - <span tal:replace="context/branch/revision_count">35</span> revisions, |
| 1660 | - <span tal:replace="context/branch/@@+product-summary-listing/recent_revision_count">31</span> in the past month. |
| 1661 | + <span tal:replace="context/branch/revision_count">35</span> revisions. |
| 1662 | </div> |
| 1663 | </tal:block> |
| 1664 | |
| 1665 | |
| 1666 | === modified file 'lib/lp/testing/menu.py' |
| 1667 | --- lib/lp/testing/menu.py 2010-08-20 20:31:18 +0000 |
| 1668 | +++ lib/lp/testing/menu.py 2010-08-24 02:26:48 +0000 |
| 1669 | @@ -5,10 +5,7 @@ |
| 1670 | |
| 1671 | __metaclass__ = type |
| 1672 | |
| 1673 | -from zope.component import getMultiAdapter |
| 1674 | - |
| 1675 | from canonical.launchpad.webapp.publisher import canonical_url |
| 1676 | -from canonical.lazr.testing.menus import make_fake_request |
| 1677 | |
| 1678 | |
| 1679 | def check_menu_links(menu): |
| 1680 | @@ -21,10 +18,10 @@ |
| 1681 | view_name, _args = link.target.split('?') |
| 1682 | else: |
| 1683 | view_name = link.target |
| 1684 | - url = canonical_url(context, view_name=view_name) |
| 1685 | - request = make_fake_request(url) |
| 1686 | + if view_name == '': |
| 1687 | + view_name = None |
| 1688 | try: |
| 1689 | - view = getMultiAdapter((context, request), name=view_name) |
| 1690 | + canonical_url(context, view_name=view_name, rootsite=link.site) |
| 1691 | except: |
| 1692 | - return 'Bad link %s: %s' % (link.name, url) |
| 1693 | + return 'Bad link %s: %s' % (link.name, canonical_url(context)) |
| 1694 | return True |
| 1695 | |
| 1696 | === modified file 'lib/lp/testing/views.py' |
| 1697 | --- lib/lp/testing/views.py 2010-08-20 20:31:18 +0000 |
| 1698 | +++ lib/lp/testing/views.py 2010-08-24 02:26:48 +0000 |
| 1699 | @@ -23,14 +23,19 @@ |
| 1700 | |
| 1701 | from canonical.config import config |
| 1702 | from canonical.launchpad.layers import setFirstLayer |
| 1703 | -from canonical.launchpad.webapp.interfaces import IPlacelessAuthUtility |
| 1704 | +from canonical.launchpad.webapp.interfaces import ( |
| 1705 | + ICanonicalUrlData, |
| 1706 | + IPlacelessAuthUtility, |
| 1707 | + ) |
| 1708 | +from canonical.launchpad.webapp.publisher import layer_for_rootsite |
| 1709 | from canonical.launchpad.webapp.servers import LaunchpadTestRequest |
| 1710 | from canonical.lazr import ExportedFolder |
| 1711 | |
| 1712 | |
| 1713 | def create_view(context, name, form=None, layer=None, server_url=None, |
| 1714 | method='GET', principal=None, query_string='', cookie='', |
| 1715 | - request=None, path_info='/', current_request=False, **kwargs): |
| 1716 | + request=None, path_info='/', current_request=False, |
| 1717 | + rootsite=None, **kwargs): |
| 1718 | """Return a view based on the given arguments. |
| 1719 | |
| 1720 | :param context: The context for the view. |
| 1721 | @@ -59,6 +64,16 @@ |
| 1722 | else: |
| 1723 | request.setPrincipal( |
| 1724 | getUtility(IPlacelessAuthUtility).unauthenticatedPrincipal()) |
| 1725 | + if layer is None: |
| 1726 | + # If a layer hasn't been specified, try to get the layer for the |
| 1727 | + # rootsite. |
| 1728 | + if rootsite is None: |
| 1729 | + # If we haven't been told a site, try to get it from the canonical |
| 1730 | + # url data of the object. |
| 1731 | + obj_urldata = ICanonicalUrlData(context, None) |
| 1732 | + if obj_urldata is not None: |
| 1733 | + rootsite = obj_urldata.rootsite |
| 1734 | + layer = layer_for_rootsite(rootsite) |
| 1735 | if layer is not None: |
| 1736 | setFirstLayer(request, layer) |
| 1737 | if current_request: |
| 1738 | @@ -70,7 +85,7 @@ |
| 1739 | def create_initialized_view(context, name, form=None, layer=None, |
| 1740 | server_url=None, method=None, principal=None, |
| 1741 | query_string=None, cookie=None, request=None, |
| 1742 | - path_info='/'): |
| 1743 | + path_info='/', rootsite=None): |
| 1744 | """Return a view that has already been initialized.""" |
| 1745 | if method is None: |
| 1746 | if form is None: |
| 1747 | @@ -79,7 +94,7 @@ |
| 1748 | method = 'POST' |
| 1749 | view = create_view( |
| 1750 | context, name, form, layer, server_url, method, principal, |
| 1751 | - query_string, cookie, request, path_info) |
| 1752 | + query_string, cookie, request, path_info, rootsite=rootsite) |
| 1753 | view.initialize() |
| 1754 | return view |
| 1755 |

<mwhudson> 7 >>> canonical_ url(getUtility( IBazaarApplicat ion)) launchpad. dev/+code' code.launchpad. dev/+code'
<mwhudson> 8 - u'http://
<mwhudson> 9 + u'http://
<mwhudson> the +code there is freaking odd really
<mwhudson> i wonder if it would actually be better to have the root objects be different for each publication
<thumper> mwhudson: probably
<thumper> mwhudson: but somewhat out of scope for this change
<rockstar> thumper, holy balls that's a big diff...
<mwhudson> thumper: yes
<thumper> rockstar: but boring
<rockstar> thumper, might I make a suggestion for the next time?
<thumper> yes
<thumper> rockstar: don't do them all at once?
<rockstar> thumper, yes, for the love of Odin, yes.
<thumper> :)
<rockstar> thumper, here's an example: line 1640-1641 of the diff doesn't look to be along the same lines as the rest of the changes in the branch.
<rockstar> Actually, 1635-1665...
<thumper> rockstar: :)
<thumper> yes, I removed a chunk of code that was showing bad data
<thumper> the person that wrote it thought it was showing the number of new revisions this month for that branch
<thumper> but what it was showing was the number of revisions on all branches this month
<rockstar> thumper, the change makes sense. I just think it would be better to not get lumped in with something that's supposed to be just technical debt.
<rockstar> Is there a bug filed for that change?
<thumper> no
<rockstar> thumper, I think there should be.
* thumper nods