# # # patch "TODO" # from [edde29b03eeb75ef9d0cc89c8295fbeb64c5fbad] # to [1da91ba2bc89a46afc6a8da974b27d2fc68a7799] # # patch "common.py" # from [6f687dd25479ed455e662fa8566f182788ab31cc] # to [d7577cc6bcadc91579d43ba695bfddd7f69373f0] # # patch "fileinbranch.psp" # from [c824cd089d7e60f85cfd63fe5fcab32b335037f5] # to [ecbb0d37fbf851b77f73e80a891bda273ea5e0cc] # # patch "headofbranch.psp" # from [171bb9e14ee1f1d92f10d27f6c585f9ab321f317] # to [0ed723e4c169ad83b1eab28a9679934ca03d0c90] # # patch "index.psp" # from [6af4d628be4f554f4b3eeabefcf6b2247820217c] # to [e0f9aeb5344ffdde24d16a352e994b0b24e886a4] # # patch "revision.psp" # from [555b392e442ff4fc400780c7be5984371e355170] # to [2fab48f3f3d26b1e523f9ae54727d81699a3bc30] # # patch "tags.psp" # from [314351544c61b3def165db6451ab7315750df886] # to [b048d6098ec2fa6b362f65545f1733b5f8f6570c] # # patch "tarofbranch.psp" # from [a960741e91ce8a92673cde044be896e61948a50f] # to [c06030b1c3542516bb4beb3401fa889e7cf9dd88] # ============================================================ --- TODO edde29b03eeb75ef9d0cc89c8295fbeb64c5fbad +++ TODO 1da91ba2bc89a46afc6a8da974b27d2fc68a7799 @@ -8,6 +8,8 @@ RSS feeds of branches (could be cute!) +headofbranch; show certs in list of heads. + Show information when mousing over long hex strings. Also, it might be more readable if the hex strings are in [ ] as they tend to merge together when looking at them. This is how MT presents the data a lot ============================================================ --- common.py 6f687dd25479ed455e662fa8566f182788ab31cc +++ common.py d7577cc6bcadc91579d43ba695bfddd7f69373f0 @@ -15,10 +15,11 @@ def link(link_type, link_to, description = None): hq = html_escape() if link_type == "revision": - rv = '[' % (urllib.quote(link_to)) + rv = '' % (urllib.quote(link_to)) if description != None: rv += hq(description) else: rv += hq(link_to[:8]) + ".." - rv += ']' + rv += '' + if description == None: rv = '[' + rv + ']' return rv elif link_type == "diff": link_to = map(urllib.quote, link_to) @@ -47,8 +48,21 @@ else: rv += hq(link_to) rv += '' return rv + elif link_type == "tar": + rv = '' % (urllib.quote(link_to)) + if description != None: rv += hq(description) + else: rv = "tar of [" + rv + hq(link_to[:8]) + "..]" + "]" + rv += '' + return rv + elif link_type == "headofbranch": + rv = '' % (urllib.quote(link_to)) + if description != None: rv += hq(description) + else: rv += "head of " + hq(link_to) + rv += '' + return rv else: rv = 'Unknown link type: %s' % (hq(link_type)) + return rv def html_escape(): "returns a function stolen from pydoc that can be used to escape HTML" ============================================================ --- fileinbranch.psp c824cd089d7e60f85cfd63fe5fcab32b335037f5 +++ fileinbranch.psp ecbb0d37fbf851b77f73e80a891bda273ea5e0cc @@ -7,6 +7,7 @@ import template from template import header,footer from monotone import Monotone +from common import link psp.set_error_page("error.psp") @@ -63,11 +64,12 @@ to access differs between them. The head revisions are listed below, along with links to download "<%=hq(path)%>" from that revision.

+ <% for id in file_version.keys(): - req.write('' % (urllib.quote(id), hq(id), urllib.quote(file_version[id]), urllib.quote(path))) + req.write('' % (link("revision", id), link("file", [file_version[id], path], "view file"))) %>
Head revisionView file
%sview
%s%s
@@ -75,6 +77,3 @@ <% req.write(template.footer(info)) %> - - - ============================================================ --- headofbranch.psp 171bb9e14ee1f1d92f10d27f6c585f9ab321f317 +++ headofbranch.psp 0ed723e4c169ad83b1eab28a9679934ca03d0c90 @@ -7,6 +7,7 @@ import template from template import header,footer from monotone import Monotone +from common import link psp.set_error_page("error.psp") @@ -39,10 +40,19 @@ req.write(header(info)) %>

-The following head ids are available. Please select one to view. +The following head IDs are available. Please select one to view.

+ + + <% for id in heads: - req.write('%s
' % (urllib.quote(id), hq(id))) - req.write(template.footer(info)) + req.write('' % (link("revision", id))) + %> +
Head revision
%s
+ +<% +req.write(template.footer(info)) +%> + ============================================================ --- index.psp 6af4d628be4f554f4b3eeabefcf6b2247820217c +++ index.psp e0f9aeb5344ffdde24d16a352e994b0b24e886a4 @@ -7,6 +7,8 @@ import template from template import header,footer from monotone import Monotone +from common import link +reload(common) psp.set_error_page("error.psp") info = { 'title' : "Branches" } @@ -41,7 +43,7 @@ <% branches.sort() for branch in branches: - req.write('%s' % (urllib.quote(branch), hq(branch))) + req.write('%s' % (link("headofbranch", branch, branch))) %> ============================================================ --- revision.psp 555b392e442ff4fc400780c7be5984371e355170 +++ revision.psp 2fab48f3f3d26b1e523f9ae54727d81699a3bc30 @@ -137,11 +137,10 @@ # ugh, need to wrap things nicer manifest_id = revision['new_manifest'][0][0][1] manifest = mt.manifest(manifest_id) - gettar='gettar.py?id=%s' % (urllib.quote(manifest_id)) %>

-All <%=len(manifest)%> files in this manifest can be downloaded together in a tar archive. +All <%=len(manifest)%> files in this manifest can be downloaded together in a <%=link("tar", manifest_id, "tar archive")%>.

============================================================ --- tags.psp 314351544c61b3def165db6451ab7315750df886 +++ tags.psp b048d6098ec2fa6b362f65545f1733b5f8f6570c @@ -7,6 +7,7 @@ import template from template import header,footer from monotone import Monotone +from common import link psp.set_error_page("error.psp") info = { 'title' : "Tags" } @@ -39,7 +40,7 @@ <% 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]))) + req.write('' % (link("revision", tag[1], tag[0]), hq(tag[2]))) %>
%s%s
%s%s
============================================================ --- tarofbranch.psp a960741e91ce8a92673cde044be896e61948a50f +++ tarofbranch.psp c06030b1c3542516bb4beb3401fa889e7cf9dd88 @@ -7,6 +7,8 @@ import template from template import header,footer from monotone import Monotone +reload(common) +from common import link psp.set_error_page("error.psp") @@ -46,7 +48,7 @@ for id in heads: revision = mt.revision(id) manifest_id = revision['new_manifest'][0][0][1] - req.write('%sdownload' % (urllib.quote(id), hq(id), urllib.quote(manifest_id))) + req.write('%s%s' % (link("revision", id), link("tar", manifest_id, "download tar archive"))) %>