changeset 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 d5fa413346e7
children e87bd3485a07
files mercurial/hgweb/webcommands.py
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hgweb/webcommands.py	Fri Mar 14 13:27:12 2014 -0700
+++ b/mercurial/hgweb/webcommands.py	Fri Mar 14 08:47:57 2014 -0700
@@ -982,7 +982,11 @@
             if len(revs) >= revcount:
                 break
 
-        dag = graphmod.dagwalker(web.repo, revs)
+        # We have to feed a baseset to dagwalker as it is expecting smartset
+        # object. This does not have a big impact on hgweb performance itself
+        # since hgweb graphing code is not itself lazy yet.
+        dag = graphmod.dagwalker(web.repo, revset.baseset(revs))
+        # As we said one line above... not lazy.
         tree = list(graphmod.colored(dag, web.repo))
 
     def getcolumns(tree):