Merge lp:~vila/udd/819910-file-mp into lp:udd

Proposed by Vincent Ladeuil
Status: Merged
Approved by: Martin Pool
Approved revision: 508
Merged at revision: 508
Proposed branch: lp:~vila/udd/819910-file-mp
Merge into: lp:udd
Diff against target: 15 lines (+2/-2)
1 file modified
import_package.py (+2/-2)
To merge this branch: bzr merge lp:~vila/udd/819910-file-mp
Reviewer Review Type Date Requested Status
Martin Pool Approve
Review via email: mp+73927@code.launchpad.net

Description of the change

cough, it's a bit weird to propose a patch for a fix that is
currently in production (and not even committed... bad vila,
bad...).

Anyway, after digging a bit and adding a couple of mutter calls,
I realized we weren't using the right url to file the mp, when
presented with canonical urls (a la
https://api.launchpad.net/1.0/... lp.branches.getByUrl was just
returning None).

The history is unclear here and I suspect that on top lp uris
changes poolie already addressed, something may also have changed
server-side.

But since those urls are not recognized, then... let's use the
regular ones ;)

The fix is therefore trivial and fixed 23 failures.

To post a comment you must log in.
Revision history for this message
Martin Pool (mbp) wrote :

thanks for fixing that.

- url=target_branch_url)
+ url=target_branch_url)

i think pep8 allows both, but I prefer just four-char indents for continuations.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'import_package.py'
2--- import_package.py 2011-08-31 15:23:33 +0000
3+++ import_package.py 2011-09-02 23:45:23 +0000
4@@ -502,9 +502,9 @@
5 def file_mp(distro, release, pocket, name, bstore, lp_side_branch_path):
6 lp_branch = lpapi.lp_call(lp.branches.getByUrl,
7 url=lp_side_branch_path)
8- target_branch_url = bstore._branch_url(distro, release, pocket)
9+ target_branch_url = bstore._branch_location(distro, release, pocket)[0]
10 target_lp_branch = lpapi.lp_call(lp.branches.getByUrl,
11- url=target_branch_url)
12+ url=target_branch_url)
13 # It would be great to notify the uploader and pusher of the merge
14 # proposal, but let's start with ~ubuntu-dev.
15 ubuntu_dev = lpapi.lp_call(operator.getitem, lp.people, 'ubuntu-dev')

Subscribers

People subscribed via source and target branches