Merge lp:~james-w/launchpad/export-specification-bug-links into lp:launchpad
Proposed by
James Westby
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 12022 | ||||
Proposed branch: | lp:~james-w/launchpad/export-specification-bug-links | ||||
Merge into: | lp:launchpad | ||||
Diff against target: |
109 lines (+30/-5) 4 files modified
lib/lp/blueprints/interfaces/specification.py (+3/-1) lib/lp/blueprints/tests/test_webservice.py (+11/-0) lib/lp/bugs/interfaces/buglink.py (+14/-4) lib/lp/bugs/interfaces/webservice.py (+2/-0) |
||||
To merge this branch: | bzr merge lp:~james-w/launchpad/export-specification-bug-links | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Guilherme Salgado (community) | code | Approve | |
Linaro Infrastructure | informational | Pending | |
Review via email: mp+42426@code.launchpad.net |
Commit message
[r=salgado]
Description of the change
Hi,
Here is a small branch to export specification/bug links, which is the
last thing required to get the Ubuntu work items tracker using the API
for blueprints, rather than screen-scraping.
I'm not entirely sure that List->Collectio
behavior, but lazr.restful doesn't do the right thing with List.
Also, I needed to add the inheritance to have lazr.restful add the bugs
property to the specifications. Previously the model just had
implements(
that.
Thanks,
James
To post a comment you must log in.
On Wed, 2010-12-01 at 22:24 +0000, James Westby wrote: nField doesn't change other
> You have been requested to review the proposed merge of lp:~james-w/launchpad/export-specification-bug-links into lp:launchpad.
>
> Hi,
>
> Here is a small branch to export specification/bug links, which is the
> last thing required to get the Ubuntu work items tracker using the API
> for blueprints, rather than screen-scraping.
>
> I'm not entirely sure that List->Collectio
> behavior, but lazr.restful doesn't do the right thing with List.
I don't think we use the field you changed for constructing any forms,
so I'd be surprised if this has any side effects.
> IBugLinkTarget) . I don't know if there is another way to achieve
> Also, I needed to add the inheritance to have lazr.restful add the bugs
> property to the specifications. Previously the model just had
> implements(
> that.
As we talked on IRC, I thought just exporting IBugLinkTarget as an entry
would make it work, but apparently it didn't?
> === modified file 'lib/lp/ blueprints/ interfaces/ specification. py' blueprints/ interfaces/ specification. py 2010-12-01 12:54:42 +0000 blueprints/ interfaces/ specification. py 2010-12-01 22:24:03 +0000 arget, interfaces. buglink import IBugLinkTarget interfaces. sprint import ISprint interfaces. branchlink import IHasLinkedBranches interfaces. milestone import IMilestone ISpecificationP ublic, ISpecificationE ditRestricted) : ISpecificationP ublic, ISpecificationE ditRestricted, as_webservice_ entry() blueprints/ tests/test_ webservice. py' blueprints/ tests/test_ webservice. py 2010-12-01 12:54:42 +0000 blueprints/ tests/test_ webservice. py 2010-12-01 22:24:03 +0000 for_anonymous, tory,
> --- lib/lp/
> +++ lib/lp/
> @@ -58,6 +58,7 @@
> IHasSpecifications,
> ISpecificationT
> )
> +from lp.bugs.
> from lp.blueprints.
> from lp.code.
> from lp.registry.
> @@ -529,7 +530,8 @@
> """Return the SpecificationBranch link for the branch, or None."""
>
>
> -class ISpecification(
> +class ISpecification(
> + IBugLinkTarget):
> """A Specification."""
>
> export_
>
> === modified file 'lib/lp/
> --- lib/lp/
> +++ lib/lp/
> @@ -14,7 +14,11 @@
> )
> from lp.testing import (
> launchpadlib_for,
> +<<<<<<< TREE
> launchpadlib_
> +=======
> + person_logged_in,
> +>>>>>>> MERGE-SOURCE
> TestCaseWithFac
A trivial conflict here.
> ws_object, .dependencies. total_size) l(spec2. name, spec_webservice .dependencies[ 0].name) tion_contains_ bug_links( self): makeSpecificati on() makeBug( ) makePerson( ) logged_ in(person) : ebservice( spec) .bugs.total_ size) l(bug.id, spec_webservice .bugs[0] .id) rgetTests( SpecificationWe bserviceTestCas e):
> )
> @@ -154,6 +158,16 @@
> self.assertEqual(1, spec_webservice
> self.assertEqua
>
> + def test_representa
> + spec = self.factory.
> + bug = self.factory.
> + person = self.factory.
> + with person_
> + spec.linkBug(bug)
> + spec_webservice = self.getSpecOnW
> + self.assertEqual(1, spec_webservice
> + self.assertEqua
> +
>
> class SpecificationTa
> """Tests for accessing specifications via their targets."""
>
> === mo...