+branch aliases fail to resolve if they contain 'bzr'

Bug #1026231 reported by Aaron Bentley
10
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://bazaar.launchpad.net/+branch/qbzr and bzr+ssh://bazaar.launchpad.net/+branch/qbzr/trunk fail to resolve.

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

Revision history for this message
William Grant (wgrant) wrote :

The regular expression in BranchLookup.getByLPPath is wrong. Escaping the "." in ".bzr" fixes it.

>>> import re
>>> path = 'foobzr'
>>> re.match('^(.*?)(/?.bzr(/.*)?)?$', path).group(1)
'fo'
>>> re.match('^(.*?)(/?\.bzr(/.*)?)?$', path).group(1)
'foobzr'

summary: - +branch aliases broken for some code branches
+ +branch aliases fail to resolve if they contain 'bzr'
Revision history for this message
William Grant (wgrant) wrote :

The introduction of that regex is also the cause of bug #1025368. So this bug will probably be fixed when the regex is necessarily removed.

Aaron Bentley (abentley)
Changed in launchpad:
status: Triaged → Fix Committed
tags: added: qa-ok
Steve Kowalik (stevenk)
Changed in launchpad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.