mercurial/templatekw.py
changeset 40568 d11e2c5b287e
parent 40527 592feb3f88b1
child 41130 074c72a38423
--- a/mercurial/templatekw.py	Wed Oct 24 18:48:43 2018 +0300
+++ b/mercurial/templatekw.py	Sun Nov 04 20:44:26 2018 +0900
@@ -774,7 +774,10 @@
     """helper to generate a list of revisions in which a mapped template will
     be evaluated"""
     repo = context.resource(mapping, 'repo')
-    f = _showcompatlist(context, mapping, name, ['%d' % r for r in revs])
+    # revs may be a smartset; don't compute it until f() has to be evaluated
+    def f():
+        srevs = ['%d' % r for r in revs]
+        return _showcompatlist(context, mapping, name, srevs)
     return _hybrid(f, revs,
                    lambda x: {name: x, 'ctx': repo[x]},
                    pycompat.identity, keytype=int)