# # # patch "templates/branchchoosehead.html" # from [797652bd041e66b5a2a2569c9c88896040d3e51d] # to [e3233066d92401b9e6a0b6a8a20c2e3cc1aa383d] # # patch "viewmtn.py" # from [799f97ff9d48c4db23fa2308194e247752df2ddc] # to [bf1d37e20485ec6133d1d5ae72dffaeb9bbb6adf] # ============================================================ --- templates/branchchoosehead.html 797652bd041e66b5a2a2569c9c88896040d3e51d +++ templates/branchchoosehead.html e3233066d92401b9e6a0b6a8a20c2e3cc1aa383d @@ -1,12 +1,16 @@ #extends branch #def body

-There are multiple head revisions of the branch $branch. You can access the method '$proxy_to' on -each of these revisions by clicking on the links provided below. If you are attempting to access -this method in a script, perhaps consider using this +There are multiple head revisions of the branch #filter Filter +$link($branch).html() +#filter WebSafe +. You can access the method +'$proxy_to' on each of these revisions by clicking on the links provided below. If you are +attempting to access this method in a script, perhaps consider using this +#filter Filter $anyhead #filter WebSafe which will always go directly to one of the head revisions. ============================================================ --- viewmtn.py 799f97ff9d48c4db23fa2308194e247752df2ddc +++ viewmtn.py bf1d37e20485ec6133d1d5ae72dffaeb9bbb6adf @@ -757,11 +757,12 @@ class BranchHead: class BranchHead: def GET(self, head_method, proxy_to, branch): + branch = mtn.Branch(branch) debug("here we are, ladies and gents") valid = ('browse', 'file', 'downloadfile', 'info', 'tar', 'graph') if not proxy_to in valid: return web.notfound() - heads = [head for head in ops.heads(branch)] + heads = [head for head in ops.heads(branch.name)] if len(heads) == 0: return web.notfound() def proxyurl(revision): @@ -771,10 +772,19 @@ class BranchHead: web.redirect(proxyurl(heads[0])) else: # present an option to the user to choose the head - anyhead = dynamic_join('/branch/anyhead/' + proxy_to + '/' + branch) + anyhead = 'link' % (dynamic_join('/branch/anyhead/' + proxy_to + '/' + branch.name)) head_links = [] for revision in heads: - head_links.append('%s' % (proxyurl(revision), revision)) + author, date = '', '' + for cert in ops.certs(revision): + if cert[4] == 'name' and cert[5] == 'date': + date = cert[7] + elif cert[4] == 'name' and cert[5] == 'author': + author = mtn.Author(cert[7]) + head_links.append('%s %s at %s' % (proxyurl(revision), + revision.abbrev(), + link(author).html(), + hq(date))) renderer.render('branchchoosehead.html', page_title="Branch %s" % branch.name, branch=branch,