Mercurial > hg-stable
changeset 99:db5eb6a86179
making change list be reverse ordered
adding link to revision in change list
changing revision links to display checkin
author | jake@edge2.net |
---|---|
date | Fri, 13 May 2005 17:27:14 -0700 |
parents | a182f2561c8e |
children | 526722d24ee5 |
files | hgweb.py |
diffstat | 1 files changed, 12 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/hgweb.py Fri May 13 13:12:32 2005 -0800 +++ b/hgweb.py Fri May 13 17:27:14 2005 -0700 @@ -56,8 +56,7 @@ -def ent_change(repo, nodeid): - changes = repo.changelog.read(nodeid) +def ent_change(repo, nodeid, changes): hn = hg.hex(nodeid) i = repo.changelog.rev(nodeid) (h1, h2) = [ hg.hex(x) for x in repo.changelog.parents(nodeid) ] @@ -74,8 +73,8 @@ for f in changes[3]: print '\t\t%s ' % f print '\t</td></tr>' -# print '\t<tr><td>revision:</td><td colspan="3">%d:<a ' % (i, ) + \ -# 'href="?cmd=rev;nd=%s">%s</a></td></tr>' % (hn, hn, ) + print '\t<tr><td>revision:</td><td colspan="3">%d:<a ' % (i, ) + \ + 'href="?cmd=chkin;nd=%s">%s</a></td></tr>' % (hn, hn, ) print '</table><br />' def ent_diff(a, b, fn): @@ -108,11 +107,11 @@ mf = repo.manifest.read(changes[0]) print '<table width="100%" border="1">' print '\t<tr><td>revision:</td><td colspan="3">%d:' % (i, ), - print '<a href="?cmd=rev;nd=%s">%s</a></td></tr>' % (hn, hn, ) + print '<a href="?cmd=chkin;nd=%s">%s</a></td></tr>' % (hn, hn, ) print '\t<tr><td>parent(s):</td><td colspan="3">%d:' % (i1, ) - print '<a href="?cmd=rev;nd=%s">%s</a>' % (h1, h1, ), + print '<a href="?cmd=chkin;nd=%s">%s</a>' % (h1, h1, ), if i2 != -1: - print ' %d:<a href="?cmd=rev;nd=%s">%s</a>' % \ + print ' %d:<a href="?cmd=chkin;nd=%s">%s</a>' % \ (i2, h2, h2, ), else: print ' %d:%s' % (i2, h2, ), @@ -158,10 +157,14 @@ def change_page(): startpage("Mercurial Web") print '<table width="100%" align="center">' - for i in xrange(0, repo.changelog.count()): + cl = [] + for i in xrange(repo.changelog.count()): n = repo.changelog.node(i) + cl.append((n, repo.changelog.read(n))) + cl.reverse() + for n, ch in cl: print '<tr><td>' - ent_change(repo, n) + ent_change(repo, n, ch) print '</td></th>' print '</table>'