comparison mercurial/hgweb/webcommands.py @ 20761:46f93b7660b6

webcommands: changed code to use lazy classes when calling dagwalker This needs to be changed to use a baseset since dagwalker now expects to receive a smartset. This is basically wrapping revs into a baseset to be compatible with smartset implementations.
author Lucas Moscovicz <lmoscovicz@fb.com>
date Fri, 14 Mar 2014 08:47:57 -0700
parents da6bea33007b
children 8c9e84b44221
comparison
equal deleted inserted replaced
20760:d5fa413346e7 20761:46f93b7660b6
980 for i in allrevs: 980 for i in allrevs:
981 revs.append(i) 981 revs.append(i)
982 if len(revs) >= revcount: 982 if len(revs) >= revcount:
983 break 983 break
984 984
985 dag = graphmod.dagwalker(web.repo, revs) 985 # We have to feed a baseset to dagwalker as it is expecting smartset
986 # object. This does not have a big impact on hgweb performance itself
987 # since hgweb graphing code is not itself lazy yet.
988 dag = graphmod.dagwalker(web.repo, revset.baseset(revs))
989 # As we said one line above... not lazy.
986 tree = list(graphmod.colored(dag, web.repo)) 990 tree = list(graphmod.colored(dag, web.repo))
987 991
988 def getcolumns(tree): 992 def getcolumns(tree):
989 cols = 0 993 cols = 0
990 for (id, type, ctx, vtx, edges) in tree: 994 for (id, type, ctx, vtx, edges) in tree: