Merge lp://staging/~jml/loggerhead/branch-from-loggerhead-simple into lp://staging/loggerhead
Proposed by
Jonathan Lange
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp://staging/~jml/loggerhead/branch-from-loggerhead-simple |
Merge into: | lp://staging/loggerhead |
To merge this branch: | bzr merge lp://staging/~jml/loggerhead/branch-from-loggerhead-simple |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Martin Albisetti | Approve | ||
Review via email: mp+3092@code.staging.launchpad.net |
To post a comment you must log in.
This patch allows loggerhead to serve Bazaar branches over HTTP. It
does this by catching requests to any paths with a '.bzr' segment, and
ensuring that those paths are served with a static application, rather
than with the branch application.
I've added a box with information about how to get the branch to every
page in loggerhead. It's not beautiful, but it's a start. To do this
well, I've had to tweak the CSS a bit. Hope it's OK.
=== modified file 'loggerhead/ apps/branch. py' apps/branch. py 2008-12-05 18:52:44 +0000 apps/branch. py 2009-01-23 20:39:37 +0000 context( **kw)
--- loggerhead/
+++ loggerhead/
@@ -70,6 +70,11 @@
kw = util.get_
return self.url(*args, **kw)
+ @property url_base + path
+ def served_url(self):
+ """The URL that you can fetch this branch from."""
+ return self.url([])
+
def static_url(self, path):
return self._static_
=== modified file 'loggerhead/ apps/filesystem .py' apps/filesystem .py 2008-12-05 20:09:14 +0000 apps/filesystem .py 2009-01-23 18:59:42 +0000
--- loggerhead/
+++ loggerhead/
@@ -7,6 +7,7 @@
from paste.request import path_info_pop
from paste import httpexceptions
+from paste import urlparser
from loggerhead. apps.branch import BranchWSGIApp 'PATH_INFO' ] == '/favicon.ico': app(environ, start_response) 'PATH_INFO' ]: make_static( None, self.folder) eSystemServer(
self. folder, self)(environ, start_response)
from loggerhead.apps import favicon_app, static_app
@@ -80,6 +81,9 @@
return static_app(environ, start_response)
elif environ[
return favicon_
+ elif '/.bzr/' in environ[
+ app = urlparser.
+ return app(environ, start_response)
else:
return BranchesFromFil
=== modified file 'loggerhead/ static/ css/diff. css' static/ css/diff. css 2008-07-24 22:07:40 +0000 static/ css/diff. css 2009-01-23 19:21:26 +0000
--- loggerhead/
+++ loggerhead/
@@ -1,5 +1,5 @@
/*Info Box*/
-#infoContainer {
+.infoContainer {
width:970px;
padding:10px 10px 0px 10px;
margin:0px 0px 10px 0px;
@@ -31,7 +31,7 @@
width:493px;
margin:0px 0px 5px 0px;
}
-.information, .comiter, .timer, .mfrom, .mto, .revid {
+.information, .committer, .timer, .mfrom, .mto, .revid {
clear:both;
margin:0px;
padding:0px 0px 2px 18px;
@@ -43,7 +43,7 @@
padding:1px 0px 0px 18px;
margin:0px 10px 5px 0px;
}
-.comiter, .mfrom, .mto {
+.committer, .mfrom, .mto {
color:#000;
padding:1px 0px 0px 18px;
margin:0px 10px 5px 0px;
=== modified file 'loggerhead/ static/ css/files. css' static/ css/files. css 2008-08-07 04:34:31 +0000 static/ css/files. css 2009-01-23 20:43:41 +0000
--- loggerhead/
+++ loggerhead/
@@ -1,13 +1,5 @@
/*Info Box*/
-#infoContainer {
- width:900px;
- padding:10px 10px 0px 10px;
- margin:0px 0px 10px 0px;
- color:#666;
- background:#fcfcfc;
- border:1px solid #b7b7b7;
-}
-.information, .comiter, .timer, .mfrom, .mto, .revid {
+.information, .committer, .timer, .mfrom, .mto, .revid {
float:left;
margin:0px 10px 5px 0px;
padding:0px 0px 2px 18px;
=== modified file 'loggerhead/ static/ css/global. css' static/ css/global. css 2008-09-09 22:47:45 +0000
--- loggerhead/
+++ loggerhead...