Merge lp://staging/~mnordhoff/loggerhead/readonly_local_path_from_url into lp://staging/loggerhead

Proposed by Matt Nordhoff
Status: Merged
Approved by: Martin Albisetti
Approved revision: 402
Merged at revision: not available
Proposed branch: lp://staging/~mnordhoff/loggerhead/readonly_local_path_from_url
Merge into: lp://staging/loggerhead
Diff against target: 91 lines (+19/-6)
4 files modified
NEWS (+3/-0)
loggerhead/apps/branch.py (+4/-2)
loggerhead/apps/transport.py (+2/-4)
loggerhead/util.py (+10/-0)
To merge this branch: bzr merge lp://staging/~mnordhoff/loggerhead/readonly_local_path_from_url
Reviewer Review Type Date Requested Status
Michael Hudson-Doyle Approve
Martin Albisetti Approve
Review via email: mp+22150@code.staging.launchpad.net

Commit message

Ignore readonly+ prefix when checking if a branch URL is local. (Matt Nordhoff)

Description of the change

This adds a loggerhead.util.local_path_from_url() function, that simple strips off the 'readonly+' prefix and thunks over to bzrlib.urlutils.local_path_from_url().

We did strip off 'readonly+' in the one place we used local_path_from_url(), but we did base.startswith('file://') in another location without taking it into account, breaking the "To get this branch" bit unless you pass --allow-writes (or set public_branch, of course).

I grepped around, and these should be the only locations affected.

(Darn, just thought of a better commit message...)

To post a comment you must log in.
Revision history for this message
Matt Nordhoff (mnordhoff) wrote :

Ehh, maybe the function I added should be given a unique name? "local_path_from_readonly_url" works, but it's rather long...

Revision history for this message
Martin Albisetti (beuno) :
review: Approve
Revision history for this message
Matt Nordhoff (mnordhoff) wrote :

Really? A blanket 'approve'? No tweaks?

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Yes. Land it already :-)

review: Approve

Updating diff...

An updated diff will be available in a few minutes. Reload to see the changes.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches