# # # add_file "help.psp" # content [98ca84f3b9ac0904360589b128e5c9b089f7843c] # # add_file "tags.psp" # content [2857513cd8656858bc8ec6e6da69f2fc13c354be] # # patch "branch.psp" # from [6aa1b9028b1c1488f21d17d84172af75d1f059bb] # to [cf04abf41b3a962e863373fcf65c3e446a15ec97] # # patch "fileinbranch.psp" # from [edc84448ac7e5f385c9bdd38dcf8845f0ed35b52] # to [4da3d1d5c4ad59223943bb947f6074ab030b64ca] # # patch "index.psp" # from [b570eec26b71ac30e1e7f124a272e809a7b37552] # to [540c27f70a7e6c5eb2e9a25e920a7809cabc4382] # # patch "revision.psp" # from [ecdb95e766ca72de6fe731ab43463678161a3962] # to [8c0ae3dc65f0bcdb61e56741675eef4cbc90516f] # # patch "template.py" # from [6fab3a1035e55b14f3bbb5babe1ec318afad673e] # to [6b5d4131e5f1edce2fb99449540276fdb627ec13] # # patch "viewmtn.css" # from [2bcdf9c1bcf24cf7f527ce3d7b4435650af0cd16] # to [32aff7b269d11ee1eb87187cc948e4435a8ce347] # # patch "wrapper.py" # from [7ab61cfe51cc96ba24361b11936639131efe42de] # to [c7b6f5953e37ea349dbb88936e9d385308083d7f] # ============================================================ --- help.psp 98ca84f3b9ac0904360589b128e5c9b089f7843c +++ help.psp 98ca84f3b9ac0904360589b128e5c9b089f7843c @@ -0,0 +1,37 @@ +<% + +import config +import common +import urllib +import template +from template import header,footer + +reload(template) + +psp.set_error_page("error.psp") +info = { 'title' : "Help" } +req.write(header(info)) + +hq = common.html_escape() +%> + +

+ViewMTN is a web interface to the Monotone revision control +system. These web pages provide an interface to the data controlled +within a particular Monotone database.

+ +

+To make full use of this web interface, it is recommended that you read +the Monotone +manual.

+ +

+Feature suggestions, bug reports, patches, ... are welcome. Please go +to the ViewMTN +home page and follow the contact instructions there.

+ +<% +req.write(template.footer(info)) +%> + ============================================================ --- tags.psp 2857513cd8656858bc8ec6e6da69f2fc13c354be +++ tags.psp 2857513cd8656858bc8ec6e6da69f2fc13c354be @@ -0,0 +1,55 @@ +<% + +import config +import monotone +import common +import urllib +import template +from template import header,footer +from monotone import Monotone + +reload(template) + +psp.set_error_page("error.psp") +info = { 'title' : "Tags" } +req.write(header(info)) + +hq = common.html_escape() +mt = Monotone(config.monotone, config.dbfile) + +tags = mt.tags() + +%> + +<% +if len(tags) == 0: +%> +

+There are no tags in the provided monotone database. +

+<% +else: +%> +

+To view a particular tag, select it from the list of tags contained +in this Monotone database. +

+ + + +<% + tags.sort(lambda x,y: cmp(x[0], y[0])) + for tag in tags: + req.write('' % (urllib.quote(tag[1]), hq(tag[0]), hq(tag[2]))) + +%> +
TagSigned by
%s%s
+ +<% + +%> + +<% +req.write(template.footer(info)) +%> + ============================================================ --- branch.psp 6aa1b9028b1c1488f21d17d84172af75d1f059bb +++ branch.psp cf04abf41b3a962e863373fcf65c3e446a15ec97 @@ -8,9 +8,6 @@ from template import header,footer from monotone import Monotone -reload(template) -reload(monotone) - psp.set_error_page("error.psp") if not form.has_key('branch'): ============================================================ --- fileinbranch.psp edc84448ac7e5f385c9bdd38dcf8845f0ed35b52 +++ fileinbranch.psp 4da3d1d5c4ad59223943bb947f6074ab030b64ca @@ -8,9 +8,6 @@ from template import header,footer from monotone import Monotone -reload(template) -reload(monotone) - psp.set_error_page("error.psp") if not form.has_key('branch'): ============================================================ --- index.psp b570eec26b71ac30e1e7f124a272e809a7b37552 +++ index.psp 540c27f70a7e6c5eb2e9a25e920a7809cabc4382 @@ -9,22 +9,18 @@ from monotone import Monotone reload(template) -reload(monotone) psp.set_error_page("error.psp") -info = { 'title' : "Branches and Tags" } +info = { 'title' : "Branches" } req.write(header(info)) hq = common.html_escape() mt = Monotone(config.monotone, config.dbfile) branches = mt.branches() -tags = mt.tags() %> -

Branches

- <% if len(branches) == 0: %> @@ -52,37 +48,7 @@ %> -

Tags

- <% -if len(tags) == 0: -%> -

-There are no tags in the provided monotone database. -

-<% -else: -%> -

-To view a particular tag, select it from the list of tags contained -in this Monotone database. -

- - - -<% - tags.sort(lambda x,y: cmp(x[0], y[0])) - for tag in tags: - req.write('' % (urllib.quote(tag[1]), hq(tag[0]), hq(tag[2]))) - -%> -
TagSigned by
%s%s
- -<% - -%> - -<% req.write(template.footer(info)) %> ============================================================ --- revision.psp ecdb95e766ca72de6fe731ab43463678161a3962 +++ revision.psp 8c0ae3dc65f0bcdb61e56741675eef4cbc90516f @@ -8,11 +8,6 @@ from template import header,footer from monotone import Monotone -reload(config) -reload(common) -reload(template) -reload(monotone) - # # revision.psp # display all information we can about a particular revision @@ -142,6 +137,11 @@ manifest = mt.manifest(manifest_id) gettar='gettar.py?id=%s' % (urllib.quote(manifest_id)) %> + +

+All <%=len(manifest)%> files in this manifest can be downloaded in a tar archive. +

+ <% @@ -155,9 +155,6 @@ %>
Filename
-

-This manifest is also available for download in a single archive: tar -

<% req.write(footer(info)) ============================================================ --- template.py 6fab3a1035e55b14f3bbb5babe1ec318afad673e +++ template.py 6b5d4131e5f1edce2fb99449540276fdb627ec13 @@ -1,4 +1,6 @@ +import time + def header(info): if not info.has_key("title"): info['title'] = "untitled" return """\ @@ -10,13 +12,18 @@ -

%(title)s

""" % (info) def footer(info): + return """\ +
+ + +""" % (time.ctime()) - return "" ============================================================ --- viewmtn.css 2bcdf9c1bcf24cf7f527ce3d7b4435650af0cd16 +++ viewmtn.css 32aff7b269d11ee1eb87187cc948e4435a8ce347 @@ -12,12 +12,6 @@ text-align: center; } -DIV#menuBar A { - padding-left: 1em; - padding-right: 1em; -} - - A { text-decoration: none; background-color: transparent; @@ -28,6 +22,14 @@ text-decoration: none; } +DIV#footer { + border-top-width: 1px; + border-top-style: solid; + border-top-color: black; + margin-top: 2em; + text-align: right; +} + TABLE { position: relative; border-width: 1px; @@ -42,13 +44,8 @@ } H1#pageTitle { - font-size: 120%; + font-size: 140%; font-family: sans-serif; - text-align: center; - border-bottom-style: dotted; - border-bottom-width: 2px; - border-bottom-color: black; - margin-bottom: 1em; } H2 { ============================================================ --- wrapper.py 7ab61cfe51cc96ba24361b11936639131efe42de +++ wrapper.py c7b6f5953e37ea349dbb88936e9d385308083d7f @@ -1,13 +1,23 @@ from mod_python import apache,psp,util import config import monotone -reload(monotone) from monotone import Monotone +import template import tarfile import os import re +# +# when debugging, it can be helpful to explictly +# reload modules here. Otherwise, you can just +# restart the web server. +# + +#reload(monotone) +#reload(config) +reload(template) + # paranoid sane_uri_re = re.compile('^\w+$')