Merge lp:~mnordhoff/loggerhead/dont-suggest-serving-remote-branches into lp:loggerhead

Proposed by Matt Nordhoff
Status: Merged
Merged at revision: not available
Proposed branch: lp:~mnordhoff/loggerhead/dont-suggest-serving-remote-branches
Merge into: lp:loggerhead
Diff against target: None lines
To merge this branch: bzr merge lp:~mnordhoff/loggerhead/dont-suggest-serving-remote-branches
Reviewer Review Type Date Requested Status
Michael Hudson-Doyle Approve
Review via email: mp+6758@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Matt Nordhoff (mnordhoff) wrote :

This makes sure that Loggerhead won't suggest itself as the "To get this branch, use" URL if the branch isn't local, since that isn't supported.

I used "branch.base.startswith('file://')" to check if the transport is local, but I'm open to suggestions if that's the wrong way to do it.

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

Fine, please land.

review: Approve
354. By Matt Nordhoff

Add a mediocre comment

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
=== modified file 'loggerhead/apps/branch.py'
--- loggerhead/apps/branch.py 2009-05-13 11:34:09 +0000
+++ loggerhead/apps/branch.py 2009-05-24 19:48:52 +0000
@@ -123,7 +123,10 @@
123 if public_branch is not None:123 if public_branch is not None:
124 self.served_url = public_branch124 self.served_url = public_branch
125 else:125 else:
126 self.served_url = self.url([])126 if self.branch.base.startswith('file://'):
127 self.served_url = self.url([])
128 else:
129 self.served_url = None
127 path = request.path_info_pop(environ)130 path = request.path_info_pop(environ)
128 if not path:131 if not path:
129 raise httpexceptions.HTTPMovedPermanently(132 raise httpexceptions.HTTPMovedPermanently(

Subscribers

People subscribed via source and target branches