diff --git a/pylons_app/config/middleware.py b/pylons_app/config/middleware.py --- a/pylons_app/config/middleware.py +++ b/pylons_app/config/middleware.py @@ -41,6 +41,8 @@ def make_app(global_conf, full_stack = T # Routing/Session/Cache Middleware app = RoutesMiddleware(app, config['routes.map']) + app = SessionMiddleware(app, config) + app = CacheMiddleware(app, config) if asbool(full_stack): # Handle Python exceptions diff --git a/pylons_app/controllers/hg.py b/pylons_app/controllers/hg.py --- a/pylons_app/controllers/hg.py +++ b/pylons_app/controllers/hg.py @@ -13,11 +13,23 @@ from ConfigParser import ConfigParser log = logging.getLogger(__name__) class HgController(BaseController): - def index(self): - return g.hgapp(request.environ, self.start_response) + + def __before__(self): + c.repos_prefix = 'etelko' + def view(self, *args, **kwargs): - return g.hgapp(request.environ, self.start_response) + response = g.hgapp(request.environ, self.start_response) + #for mercurial protocols we can't wrap into mako + if request.environ['HTTP_ACCEPT'].find("mercurial") >= 0: + return response + + #wrap the murcurial response in a mako template. + template = Template("".join(response), + lookup = request.environ['pylons.pylons']\ + .config['pylons.g'].mako_lookup) + + return template.render(g = g, c = c, session = session, h = h) def add_repo(self, new_repo): c.staticurl = g.statics diff --git a/pylons_app/templates/monoblue_custom/changelog.tmpl b/pylons_app/templates/monoblue_custom/changelog.tmpl --- a/pylons_app/templates/monoblue_custom/changelog.tmpl +++ b/pylons_app/templates/monoblue_custom/changelog.tmpl @@ -24,10 +24,13 @@
  • graph
  • tags
  • branches
  • -
  • files{archives%archiveentry}
  • - +
  • files
  • + + - +
    {entries%changelogentry} diff --git a/pylons_app/templates/monoblue_custom/index.tmpl b/pylons_app/templates/monoblue_custom/index.tmpl --- a/pylons_app/templates/monoblue_custom/index.tmpl +++ b/pylons_app/templates/monoblue_custom/index.tmpl @@ -5,7 +5,7 @@
    diff --git a/pylons_app/templates/monoblue_custom/shortlog.tmpl b/pylons_app/templates/monoblue_custom/shortlog.tmpl --- a/pylons_app/templates/monoblue_custom/shortlog.tmpl +++ b/pylons_app/templates/monoblue_custom/shortlog.tmpl @@ -24,18 +24,20 @@
  • graph
  • tags
  • branches
  • -
  • files{archives%archiveentry}
  • +
  • files
  • - + -{entries%shortlogentry} + {entries%shortlogentry}
    -{changenav%navshortentry} + {changenav%navshortentry}
    {footer}