diff mercurial/hgweb/webcommands.py @ 16720:e825a89de5d7

context: add changectx.closesbranch() method This removes the duplicated code for inspecting the 'close' extra field in a changeset.
author Brodie Rao <brodie@sf.io>
date Sun, 13 May 2012 14:04:06 +0200
parents e7bf09acd410
children 3e24ce3de5f1
line wrap: on
line diff
--- a/mercurial/hgweb/webcommands.py	Sun May 13 14:04:04 2012 +0200
+++ b/mercurial/hgweb/webcommands.py	Sun May 13 14:04:06 2012 +0200
@@ -441,7 +441,7 @@
     tips = (web.repo[n] for t, n in web.repo.branchtags().iteritems())
     heads = web.repo.heads()
     parity = paritygen(web.stripecount)
-    sortkey = lambda ctx: ('close' not in ctx.extra(), ctx.rev())
+    sortkey = lambda ctx: (not ctx.closesbranch(), ctx.rev())
 
     def entries(limit, **map):
         count = 0