Merge lp:~james-w/launchpad/code-imports-use-ibranchtarget into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | Tim Penhey on 2010-03-18 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | not available |
| Proposed branch: | lp:~james-w/launchpad/code-imports-use-ibranchtarget |
| Merge into: | lp:launchpad |
| Prerequisite: | lp:~james-w/launchpad/nuke-code-import-warts |
| Diff against target: |
556 lines (+75/-61) 14 files modified
lib/canonical/launchpad/webapp/tales.py (+2/-2) lib/lp/code/browser/codeimport.py (+2/-1) lib/lp/code/doc/codeimport.txt (+26/-25) lib/lp/code/interfaces/codeimport.py (+5/-2) lib/lp/code/mail/tests/test_codeimport.py (+4/-4) lib/lp/code/model/codeimport.py (+2/-2) lib/lp/code/model/tests/test_branchtarget.py (+1/-1) lib/lp/code/model/tests/test_codeimport.py (+9/-8) lib/lp/code/stories/branches/xx-branch-edit.txt (+1/-1) lib/lp/code/stories/codeimport/xx-admin-codeimport.txt (+5/-5) lib/lp/code/stories/codeimport/xx-edit-codeimport.txt (+1/-1) lib/lp/code/stories/codeimport/xx-failing-codeimport.txt (+1/-1) lib/lp/code/stories/webservice/xx-code-import.txt (+1/-1) lib/lp/testing/factory.py (+15/-7) |
| To merge this branch: | bzr merge lp:~james-w/launchpad/code-imports-use-ibranchtarget |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Tim Penhey (community) | 2010-03-18 | Approve on 2010-03-18 | |
|
Review via email:
|
|||
Commit Message
ICodeImportSet.new now takes an IBranchTarget instead of an IProduct.
Description of the Change
Make ICodeImportSet.new act on IBranchTargets.
The code import creation only cares about a namespace, so use the more
generic interface to get one.
This changes the factory, adding makeProductCode
to pass product which will be turned in to an IBranch target as needed.
This doesn't add any new functionality, that will come later.
Most of the changes are mechanical, it's only a few places where the
behaviour may have changed.
| James Westby (james-w) wrote : | # |
| Tim Penhey (thumper) wrote : | # |
James, this all looks good.
My only comment is about the codeimport doc test.
How much work is it to change the following line:
>>> target = IBranchTarget(
to use factory.
I'd love to move more away from sample data in the tests.
| James Westby (james-w) wrote : | # |
On Thu, 18 Mar 2010 21:06:13 -0000, Tim Penhey <email address hidden> wrote:
> Review: Approve
> James, this all looks good.
>
> My only comment is about the codeimport doc test.
>
> How much work is it to change the following line:
>
> >>> target = IBranchTarget(
>
> to use factory.
>
> I'd love to move more away from sample data in the tests.
I'll have a look, it's rather an old doctest, so there may be some
cleanup involved.
Thanks,
James
| Tim Penhey (thumper) wrote : | # |
If you are going to print out the email of a person, make it explicit in the creation of the person.
So,
factory.
instead of just:
factory.
Thanks for updating the test.
| James Westby (james-w) wrote : | # |
Fixed, it now defines the name and email for the created person
so as not to rely on the created values.
Thanks,
James

Now passes all .*code.* tests in ec2, so ready for review.
Thanks,
James