Merge lp:~thumper/launchpad/branch-target-adapters into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | Tim Penhey on 2010-08-12 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | 11334 |
| Proposed branch: | lp:~thumper/launchpad/branch-target-adapters |
| Merge into: | lp:launchpad |
| Diff against target: |
129 lines (+52/-3) 4 files modified
lib/lp/code/configure.zcml (+10/-0) lib/lp/code/interfaces/branchtarget.py (+3/-1) lib/lp/code/model/branchtarget.py (+14/-0) lib/lp/code/model/tests/test_branchtarget.py (+25/-2) |
| To merge this branch: | bzr merge lp:~thumper/launchpad/branch-target-adapters |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Michael Hudson-Doyle | 2010-08-03 | Approve on 2010-08-04 | |
|
Review via email:
|
|||
Commit Message
Add a few more adapters to IBranchTarget.
Description of the Change
As part of the on-going work to make the smart server understand the short lp: style urls for private branches, I need some extra branch target adapters. This branch adds the adapters for IProductSeries -> IBranchTarget, and IDistributionSo
tests:
test_.*_adapter
| Jonathan Lange (jml) wrote : | # |
| Tim Penhey (thumper) wrote : | # |
On Wed, 04 Aug 2010 09:41:13 you wrote:
> On Tue, Aug 3, 2010 at 10:33 PM, Tim Penhey <email address hidden>
wrote:
> > Tim Penhey has proposed merging
> > lp:~thumper/launchpad/branch-target-adapters into lp:launchpad/devel.
>
> ...
>
> > As part of the on-going work to make the smart server understand the
> > short lp: style urls for private branches, I need some extra branch
> > target adapters. This branch adds the adapters for IProductSeries ->
> > IBranchTarget, and IDistributionSo
>
> I'm curious. This wasn't a part of the work we did at the Epic... why
> is this needed?
>
> jml
It is part of that "minor" bit that was left :-)
It makes the code that allows the branch creation to work when given a short
name, and the ability to set the linked branch.
We use the ILinkedBranchTr
Product, ProductSeries, SourcePackage, DistributionSou
We then adapt that to an IBranchTarget. We then use the target to get the
IBranchNamespace for the requester. Then we can check branch names to make
sure there isn't a conflict.
The the guts of the reason is to go from something that can have a linked
branch to a branch namespace we go through a branch target.
Tim
| Michael Hudson-Doyle (mwhudson) wrote : | # |
Looks fine. The tests could use comments. I don't like the use of self.original (a product?) in test_productser

On Tue, Aug 3, 2010 at 10:33 PM, Tim Penhey <email address hidden> wrote: urcePackage -> IBranchTarget.
> Tim Penhey has proposed merging lp:~thumper/launchpad/branch-target-adapters into lp:launchpad/devel.
...
> As part of the on-going work to make the smart server understand the short lp: style urls for private branches, I need some extra branch target adapters. This branch adds the adapters for IProductSeries -> IBranchTarget, and IDistributionSo
I'm curious. This wasn't a part of the work we did at the Epic... why
is this needed?
jml