#
#
# patch "revision.psp"
# from [c36c7b35a37cfa813914867e19cccdf7dc65dfed]
# to [735c03c2b80c7d4f09082abebda060e87b09fba4]
#
============================================================
--- revision.psp c36c7b35a37cfa813914867e19cccdf7dc65dfed
+++ revision.psp 735c03c2b80c7d4f09082abebda060e87b09fba4
@@ -18,6 +18,9 @@
# display all information we can about a particular revision
#
+def prettify(s):
+ return ' '.join(map(lambda x: x[0].upper() + x[1:], s.replace("_", " ").split(" ")))
+
psp.set_error_page("error.psp")
if not form.has_key('id'):
@@ -56,7 +59,7 @@
name, value = cert["Name"][0], hq(cert["Value"])
if name == "branch":
value = '' % (urllib.quote(value)) + value + ''
- req.write('
%s | %s |
' % (name, value))
+ req.write('%s | %s |
' % (hq(prettify(name)), value))
%>
@@ -72,20 +75,20 @@
type = stanza[0][0]
if type == "patch":
fname, from_id, to_id = stanza[0][1], stanza[1][1], stanza[2][1]
- value += 'Patch file %s from %s to %s (diff)
' % (hq(fname), urllib.quote(from_id), hq(from_id), urllib.quote(to_id), hq(to_id), urllib.quote(from_id), urllib.quote(to_id))
+ value += 'Patch file %s from %s to %s (diff)
' % (hq(fname), urllib.quote(from_id), hq(from_id), urllib.quote(to_id), hq(to_id), urllib.quote(from_id), urllib.quote(to_id))
elif type == "old_revision":
old_revision, old_manifest = stanza[0][1], stanza[1][1]
- value += 'Old revision is: %s
Old manifest: %s' % (urllib.quote(old_revision), hq(old_revision), hq(old_manifest))
+ value += 'Old revision is: %s
Old manifest: %s
' % (urllib.quote(old_revision), hq(old_revision), hq(old_manifest))
elif type == "new_manifest":
new_manifest = stanza[0][1]
- value += 'New manifest is: %s' % (hq(old_manifest))
+ value += 'New manifest is: %s
' % (hq(old_manifest))
elif type == "add_file":
new_file = stanza[0][1]
value += "Add file: %s
" % (hq(new_file))
elif type == "delete_file":
delete_file = stanza[0][1]
value += "Delete file: %s
" % (hq(delete_file))
- req.write('%s | %s |
' % (hq(key), value))
+ req.write('%s | %s |
' % (hq(prettify(key)), value))
%>