+branch aliases fail to resolve if they contain 'bzr'
Bug #1026231 reported by
Aaron Bentley
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
Critical
|
Unassigned |
Bug Description
Iwata reported earlier today that lp:qbzr and lp:tortoisebzr are
currently broken. The real branch locations, like
lp:~qbzr-dev/qbzr/trunk2a still work fine, but
bzr+ssh:
Similarly, the API's getBranchByUrl does not resolve these branches.
From talking to Aaron, this is probably fallout from r16509.
What's slightly mysterious is there's nothing obviously different
about this two branches that isn't also true about branches that do
still work. Both had their trunk moved in the past, but other projects
that have done that are not affected.
Related branches
lp:~abentley/launchpad/broken-xmlrpc-lookup
- Deryck Hodge (community): Approve
-
Diff: 118 lines (+19/-28)4 files modifiedlib/lp/app/browser/tests/test_launchpad.py (+8/-9)
lib/lp/code/interfaces/branchlookup.py (+0/-2)
lib/lp/code/model/branchlookup.py (+8/-6)
lib/lp/code/model/tests/test_branchlookup.py (+3/-11)
Changed in launchpad: | |
status: | Triaged → Fix Committed |
tags: | added: qa-ok |
Changed in launchpad: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
The regular expression in BranchLookup. getByLPPath is wrong. Escaping the "." in ".bzr" fixes it.
>>> import re '^(.*?) (/?.bzr( /.*)?)? $', path).group(1) '^(.*?) (/?\.bzr( /.*)?)? $', path).group(1)
>>> path = 'foobzr'
>>> re.match(
'fo'
>>> re.match(
'foobzr'