Merge lp:~jcsackett/launchpad/deprecate-official_codehosting into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | j.c.sackett on 2010-08-31 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | 11484 |
| Proposed branch: | lp:~jcsackett/launchpad/deprecate-official_codehosting |
| Merge into: | lp:launchpad |
| Diff against target: |
330 lines (+72/-30) 8 files modified
lib/lp/registry/adapters.py (+18/-2) lib/lp/registry/browser/distribution.py (+2/-1) lib/lp/registry/browser/pillar.py (+16/-7) lib/lp/registry/browser/productseries.py (+11/-3) lib/lp/registry/browser/tests/pillar-views.txt (+8/-8) lib/lp/registry/browser/tests/productseries-views.txt (+4/-4) lib/lp/registry/configure.zcml (+7/-0) lib/lp/registry/stories/product/xx-product-launchpad-usage.txt (+6/-5) |
| To merge this branch: | bzr merge lp:~jcsackett/launchpad/deprecate-official_codehosting |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Brad Crittenden (community) | code | 2010-08-27 | Approve on 2010-08-27 |
|
Review via email:
|
|||
Commit Message
Replaces use of official_
Description of the Change
= Summary =
Replaces use of official_
== Proposed fix ==
Where official_
== Pre-implementation notes ==
Spoke with Curtis.
== Implementation details ==
As in Proposed fix.
== Tests ==
bin/test -vvc -t productseries-
bin/test -vvc -t pillar-views.txt
bin/test -vvc -t distribution-
== Demo and Q/A ==
Check out a project, product and distribution on launchpad.dev.
Everything should function as before--this shouldn't have introduced
any visible changes.
= Launchpad lint =
Checking for conflicts and issues in changed files.
Linting changed files:
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
| j.c.sackett (jcsackett) wrote : | # |
Brad,
I actually deliberately expanded some clauses into the if constructs because I found them easier to parse.
I'm not opposed to a helper function, since the inside of that would be fairly clear, but assigning a boolean
expression to a variable is sort of difficult to scan in a large block of code.
Thoughts?
On Aug 27, 2010, at 4:49 PM, Brad Crittenden wrote:
> Review: Approve code
> This branch looks nice Jon. What would you think of creating some helper functions like:
>
> uses_Launchpad(
>
> You could then collapse this:
>
> 175 + if self.codehostin
> 176 + configured = True
> 177 + else:
> 178 + configured = False
> 179 return [dict(link=
> 181 + configured=
>
> to:
>
> 179 return [dict(link=
> 181 + configured=
>
> I guess you could do the same with:
>
> configured = (self.codehosti
>
> with less overhead.
> --
> https:/
> Your team Launchpad code reviewers from Canonical is subscribed to branch lp:launchpad/devel.
>
> --
> launchpad-reviews mailing list
> <email address hidden>
> https:/
| Brad Crittenden (bac) wrote : | # |
On Aug 27, 2010, at 19:25, "j.c.sackett" <email address hidden> wrote:
> Brad,
>
> I actually deliberately expanded some clauses into the if constructs because I found them easier to parse.
>
> I'm not opposed to a helper function, since the inside of that would be fairly clear, but assigning a boolean
> expression to a variable is sort of difficult to scan in a large block of code.
>
> Thoughts?
What you have now is fine to land. If we find ourselves repeating that logic elsewhere then we can create a helper.
Brad
>

This branch looks nice Jon. What would you think of creating some helper functions like:
uses_Launchpad( thing)
You could then collapse this:
175 + if self.codehostin g_usage == ServiceUsage. LAUNCHPAD: set_branch, configured) ]
176 + configured = True
177 + else:
178 + configured = False
179 return [dict(link=
181 + configured=
to:
179 return [dict(link= set_branch, uses_launchpad( self.codehostin g_usage)
181 + configured=
I guess you could do the same with:
configured = (self.codehosti ng_usage == ServiceUsage. LAUNCHPAD)
with less overhead.