# HG changeset patch # User jake@edge2.net # Date 1116030434 25200 # Node ID db5eb6a86179ce819db03da9ef2090b32f8e3fc4 # Parent a182f2561c8e964fb739fd88b5e049f9216911fb making change list be reverse ordered adding link to revision in change list changing revision links to display checkin diff -r a182f2561c8e -r db5eb6a86179 hgweb.py --- 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' -# print '\trevision:%d:%s' % (hn, hn, ) + print '\trevision:%d:%s' % (hn, hn, ) print '
' def ent_diff(a, b, fn): @@ -108,11 +107,11 @@ mf = repo.manifest.read(changes[0]) print '' print '\t' % (hn, hn, ) + print '%s' % (hn, hn, ) print '\t
revision:%d:' % (i, ), - print '%s
parent(s):%d:' % (i1, ) - print '%s' % (h1, h1, ), + print '%s' % (h1, h1, ), if i2 != -1: - print '  %d:%s' % \ + print '  %d:%s' % \ (i2, h2, h2, ), else: print '  %d:%s' % (i2, h2, ), @@ -158,10 +157,14 @@ def change_page(): startpage("Mercurial Web") print '' - 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 '' print '
' - ent_change(repo, n) + ent_change(repo, n, ch) print '
'