diff --git a/hgweb.py b/hgweb.py --- a/hgweb.py +++ b/hgweb.py @@ -56,8 +56,7 @@ def endpage(): -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 @@ def ent_change(repo, nodeid): 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 @@ def ent_checkin(repo, nodeid): 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 ent_file(repo, nodeid, fn): 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 '
'