Merge lp:~mwhudson/launchpad/no-hosted-area-strengthen-codebrowse into lp:launchpad/db-devel

Proposed by Michael Hudson-Doyle
Status: Rejected
Rejected by: Michael Hudson-Doyle
Proposed branch: lp:~mwhudson/launchpad/no-hosted-area-strengthen-codebrowse
Merge into: lp:launchpad/db-devel
Prerequisite: lp:~mwhudson/launchpad/no-hosted-area-join-launchpad-loggerhead
Diff against target: 74 lines (+9/-9)
3 files modified
configs/development/launchpad-lazr.conf (+1/-1)
lib/lp/codehosting/bzrutils.py (+5/-4)
lib/lp/codehosting/vfs/branchfs.py (+3/-4)
To merge this branch: bzr merge lp:~mwhudson/launchpad/no-hosted-area-strengthen-codebrowse
Reviewer Review Type Date Requested Status
Tim Penhey (community) Needs Information
Review via email: mp+24106@code.launchpad.net

Description of the change

Hi for the last time I hope in this pipe,

This branch changes codebrowse to access branches in a more similar way to the rest of Launchpad, by using a lp_server that's tied to a particular user.

This branch also /almost certainly/ fixes codebrowse for private branches, although it seems that the testopenid.dev server is too crappy to use with codebrowse -- we need to find out the logged in user's name using a sreg extension and it doesn't seem that lp.testopendid supports that.

Cheers,
mwh

To post a comment you must log in.
Revision history for this message
Tim Penhey (thumper) wrote :

Perhaps it is alluding me, but where is it changing codebrowse?

review: Needs Information

Unmerged revisions

9731. By Michael Hudson-Doyle

this time after actual testing

9730. By Michael Hudson-Doyle

access the branches over http, doh!

9729. By Michael Hudson-Doyle

tweaks to codebrowse nagivation, which more or less coincidentally should fix codebrowse for private branches

9728. By Michael Hudson-Doyle

tweaks to codebrowse nagivation, which more or less coincidentally should fix codebrowse for private branches

9727. By Michael Hudson-Doyle

move the rest of the launchpad-loggerhead glue into the tree

9726. By Michael Hudson-Doyle

move launchpad_loggerhead code into lib

9725. By Michael Hudson-Doyle

join launchpad-loggerhead into the launchpad tree

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'configs/development/launchpad-lazr.conf'
2--- configs/development/launchpad-lazr.conf 2010-04-26 06:37:23 +0000
3+++ configs/development/launchpad-lazr.conf 2010-04-26 06:37:28 +0000
4@@ -45,7 +45,7 @@
5
6 [codebrowse]
7 cachepath: /var/tmp/codebrowse.launchpad.dev/cache
8-log_folder:
9+log_folder: /var/tmp/codebrowse.launchpad.dev/logs
10 launchpad_root: https://code.launchpad.dev/
11 secret_path: configs/development/codebrowse-secret
12
13
14=== modified file 'lib/lp/codehosting/bzrutils.py'
15--- lib/lp/codehosting/bzrutils.py 2010-04-26 06:37:23 +0000
16+++ lib/lp/codehosting/bzrutils.py 2010-04-26 06:37:28 +0000
17@@ -302,7 +302,7 @@
18 _install_checked_open_hook()
19
20
21-def checked_open(validation_function, url):
22+def checked_open(validation_function, url, possible_transports=None):
23 """Open a branch, calling `validation_function` with any URL thus found.
24
25 This is intended to be used to open a branch ensuring that it's not
26@@ -312,7 +312,7 @@
27 raise AssertionError("checked_open called recursively")
28 checked_open_data.validate = validation_function
29 try:
30- return Branch.open(url)
31+ return Branch.open(url, possible_transports=possible_transports)
32 finally:
33 del checked_open_data.validate
34
35@@ -332,10 +332,11 @@
36 return checkURL
37
38
39-def safe_open(allowed_scheme, url):
40+def safe_open(allowed_scheme, url, possible_transports=None):
41 """Open the branch at `url`, only accessing URLs on `allowed_scheme`.
42
43 :raises UnsafeUrlSeen: An attempt was made to open a URL that was not on
44 `allowed_scheme`.
45 """
46- return checked_open(makeURLChecker(allowed_scheme), url)
47+ return checked_open(
48+ makeURLChecker(allowed_scheme), url, possible_transports)
49
50=== modified file 'lib/lp/codehosting/vfs/branchfs.py'
51--- lib/lp/codehosting/vfs/branchfs.py 2010-04-26 06:37:23 +0000
52+++ lib/lp/codehosting/vfs/branchfs.py 2010-04-26 06:37:28 +0000
53@@ -671,7 +671,7 @@
54 return deferred.addCallback(got_path_info).addErrback(log.err)
55
56
57-def get_lp_server(user_id, codehosting_endpoint_url=None, branch_directory=None,
58+def get_lp_server(user_id, codehosting_endpoint_url=None, branch_url=None,
59 seen_new_branch_hook=None):
60 """Create a Launchpad server.
61
62@@ -686,10 +686,9 @@
63 # Get the defaults from the config.
64 if codehosting_endpoint_url is None:
65 codehosting_endpoint_url = config.codehosting.codehosting_endpoint
66- if branch_directory is None:
67- branch_directory = config.codehosting.mirrored_branches_root
68+ if branch_url is None:
69+ branch_url = config.codehosting.mirrored_branches_root
70
71- branch_url = urlutils.local_path_to_url(branch_directory)
72 codehosting_client = xmlrpclib.ServerProxy(codehosting_endpoint_url)
73 branch_transport = get_chrooted_transport(branch_url)
74 lp_server = LaunchpadServer(

Subscribers

People subscribed via source and target branches

to status/vote changes: