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
1=== modified file 'loggerhead/apps/branch.py'
2--- loggerhead/apps/branch.py 2009-05-13 11:34:09 +0000
3+++ loggerhead/apps/branch.py 2009-05-24 19:48:52 +0000
4@@ -123,7 +123,10 @@
5 if public_branch is not None:
6 self.served_url = public_branch
7 else:
8- self.served_url = self.url([])
9+ if self.branch.base.startswith('file://'):
10+ self.served_url = self.url([])
11+ else:
12+ self.served_url = None
13 path = request.path_info_pop(environ)
14 if not path:
15 raise httpexceptions.HTTPMovedPermanently(

Subscribers

People subscribed via source and target branches