Merge lp:~mwhudson/launchpad/vostok-traverse-distro into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | Tim Penhey on 2010-08-06 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | 11327 |
| Proposed branch: | lp:~mwhudson/launchpad/vostok-traverse-distro |
| Merge into: | lp:launchpad |
| Prerequisite: | lp:~mwhudson/launchpad/vostok-main-template |
| Diff against target: |
137 lines (+71/-2) 4 files modified
lib/lp/testing/factory.py (+5/-2) lib/lp/vostok/browser/configure.zcml (+5/-0) lib/lp/vostok/publisher.py (+18/-0) lib/lp/vostok/tests/test_navigation.py (+43/-0) |
| To merge this branch: | bzr merge lp:~mwhudson/launchpad/vostok-traverse-distro |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Tim Penhey (community) | 2010-07-29 | Approve on 2010-08-06 | |
| Robert Collins (community) | Needs Fixing on 2010-07-30 | ||
|
Review via email:
|
|||
Commit Message
Add a navigation for the vostok root that allows you to traverse to distributions
Description of the Change
Hi,
This branch adds a navigation for the vostok root that allows you to traverse
to distributions.
Cheers,
mwh
| Robert Collins (lifeless) wrote : | # |
This change is faulty:
- 'Unrecognized branch type: %r' % (branch_type,))
+ 'Unrecognized branch type: %r' % branch_type)
if branch_type is a tuple with length != 1, it will blow up in your version, and for a error code path thats undesirable. I haven't done a full review - was glancing in email and this jumped out at me.
| Tim Penhey (thumper) wrote : | # |
On Fri, 30 Jul 2010 16:04:43 you wrote:
> Review: Needs Fixing
>
> This change is faulty:
>
> - 'Unrecognized branch type: %r' % (branch_type,))
> + 'Unrecognized branch type: %r' % branch_type)
>
> if branch_type is a tuple with length != 1, it will blow up in your
> version, and for a error code path thats undesirable. I haven't done a
> full review - was glancing in email and this jumped out at me.
Yeah, but branch_type is always a BranchType enum value, which is why I let
this slide.
| Michael Hudson-Doyle (mwhudson) wrote : | # |
On Thu, 29 Jul 2010 23:44:46 -0000, Tim Penhey <email address hidden> wrote:
> Review: Needs Information
> Agh - perhaps it is just me, but __get_item__ on I<any>Set just seems wrong to
> me.
Changed to getByName.
> > return self.redirectSu
>
> That will take the user out of the vostok vhost. Is that what you want?
Actually it won't.
> If not, you probably want to set the root as part of the canonical_url call.
I think canonical_url looks at the current request to find the root
site.
I also made the change Rob suggested.
Cheers,
mwh
| Robert Collins (lifeless) wrote : | # |
On Fri, Jul 30, 2010 at 6:33 AM, Tim Penhey <email address hidden> wrote:
>> if branch_type is a tuple with length != 1, it will blow up in your
>> version, and for a error code path thats undesirable. I haven't done a
>> full review - was glancing in email and this jumped out at me.
>
> Yeah, but branch_type is always a BranchType enum value, which is why I let
> this slide.
From IRC - its good to keep reflexes from having to deal with false
signals - while its true here that its always not a tuple, in the
general case we should be wary of direct substitution like this, so
its nice to have it clearly safe.
-Rob
| Guilherme Salgado (salgado) wrote : | # |
lib/lp/
| Tim Penhey (thumper) wrote : | # |
You should import NotFound from lp.app.errors, but apart from that it looks good.

Agh - perhaps it is just me, but __get_item__ on I<any>Set just seems wrong to
me.
> return self.redirectSu bTree(canonical _url(distro) , status=301)
That will take the user out of the vostok vhost. Is that what you want?
If not, you probably want to set the root as part of the canonical_url call.