Merge lp:~madjar/wikkid/plugin into lp:wikkid

Proposed by Georges Dubus
Status: Merged
Merged at revision: 45
Proposed branch: lp:~madjar/wikkid/plugin
Merge into: lp:wikkid
Diff against target: 35 lines (+12/-8)
1 file modified
plugin/commands.py (+12/-8)
To merge this branch: bzr merge lp:~madjar/wikkid/plugin
Reviewer Review Type Date Requested Status
Wikkid Hackers Pending
Review via email: mp+28339@code.launchpad.net

Description of the change

Updated the plugin, so that it works again after the transition from twisted to webbob.

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

On Thu, 24 Jun 2010 06:39:53 you wrote:
> Georges Dubus has proposed merging lp:~madjar/wikkid/plugin into lp:wikkid.
>
> Requested reviews:
> Wikkid Hackers (wikkid)
>
>
> Updated the plugin, so that it works again after the transition from
> twisted to webbob.

Ah, thanks. That completely slipped my mind. Is there any way we could add a
test for this?

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugin/commands.py'
2--- plugin/commands.py 2010-05-21 09:16:54 +0000
3+++ plugin/commands.py 2010-06-23 18:39:52 +0000
4@@ -6,10 +6,9 @@
5
6 from bzrlib.workingtree import WorkingTree
7
8+from wikkid.app import WikkidApp
9 from wikkid.filestore.bzr import FileStore
10-from wikkid.model.factory import ResourceFactory
11-from wikkid.twistedserver import TwistedServer
12-from wikkid.user.bzr import UserFactory
13+from wikkid.user.bzr import LocalBazaarUserMiddleware
14
15 DEFAULT_PORT = 8080
16
17@@ -42,8 +41,13 @@
18 working_tree = WorkingTree.open(branch)
19 logger.info('Using: %s', working_tree)
20 filestore = FileStore(working_tree)
21- server = TwistedServer(
22- ResourceFactory(filestore),
23- UserFactory(working_tree.branch),
24- port=port)
25- server.run()
26+
27+ app = WikkidApp(filestore)
28+ app = LocalBazaarUserMiddleware(app, working_tree.branch)
29+ from wsgiref.simple_server import make_server
30+ httpd = make_server('localhost', port, app)
31+ logger.info('Serving on http://localhost:%s', port)
32+ try:
33+ httpd.serve_forever()
34+ except KeyboardInterrupt:
35+ logger.info('Done.')

Subscribers

People subscribed via source and target branches