# # # add_file "tarofbranch.psp" # content [36e4da8c38d6492b0bb969f72e7d88ab7df609ca] # # patch "TODO" # from [843f2568c929a136b3a194b68996bf9eb5ed81d1] # to [c02b42866e7b219f3e62a23a963a4e6168eff1b7] # ============================================================ --- tarofbranch.psp 36e4da8c38d6492b0bb969f72e7d88ab7df609ca +++ tarofbranch.psp 36e4da8c38d6492b0bb969f72e7d88ab7df609ca @@ -0,0 +1,51 @@ +<% + +import config +import monotone +import common +import urllib +import template +from template import header,footer +from monotone import Monotone + +psp.set_error_page("error.psp") + +if not form.has_key('branch'): + raise Exception("No branch specified.") +branch = form['branch'] + +# tarofbranch.psp +# +# allow a tar file to be retrieved of the latest +# HEAD of a branch. If there are multiple heads, +# present a choice. + +mt = Monotone(config.monotone, config.dbfile) + +heads = mt.heads(branch) +if len(heads) == 0: + raise Exception("No head ID can be determined for this branch.") +elif len(heads) == 1: + revision = mt.revision(heads[0]) + manifest_id = revision['new_manifest'][0][0][1] + psp.redirect("gettar.py?id=%s" % (urllib.quote(manifest_id))) +else: + hq = common.html_escape() + info = {'title' : "Latest tar file of branch %s" % (hq(branch))} + req.write(header(info)) +%> +

+The branch you have selected has multiple head revisions The head +revisions are listed below, along with links to download a tar file of +each revision. +

+ + + +<% + for id in heads: + revision = mt.revision(id) + manifest_id = revision['new_manifest'][0][0][1] + req.write('' % (urllib.quote(id), hq(id), urllib.quote(manifest_id))) + req.write(template.footer(info)) +%> ============================================================ --- TODO 843f2568c929a136b3a194b68996bf9eb5ed81d1 +++ TODO c02b42866e7b219f3e62a23a963a4e6168eff1b7 @@ -8,13 +8,15 @@ RSS feeds of branches (could be cute!) -Show more information in ancestry graph (author, date) - 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 of the time, anyway. +When hovering over nodes in the ancestry graph, display the ChangeLog. + Remove dependency on goatpy (don't really want released software to rely on it.) +URL to get the latest tar file of a branch. +
Revision IDTar file
%sview