##// END OF EJS Templates
templater: fix revset() to evaluate format arguments eagerly...
Yuya Nishihara -
r28333:41373244 default
parent child Browse files
Show More
@@ -578,7 +578,7 b' def revset(context, mapping, args):'
578 578 return m(repo)
579 579
580 580 if len(args) > 1:
581 formatargs = list([a[0](context, mapping, a[1]) for a in args[1:]])
581 formatargs = [evalfuncarg(context, mapping, a) for a in args[1:]]
582 582 revs = query(revsetmod.formatspec(raw, *formatargs))
583 583 revs = list(revs)
584 584 else:
@@ -3305,6 +3305,9 b' Test revset function'
3305 3305 $ hg log --template '{revset("TIP"|lower)}\n' -l1
3306 3306 2
3307 3307
3308 $ hg log -T '{revset("%s", "t{"ip"}")}\n' -l1
3309 2
3310
3308 3311 a list template is evaluated for each item of revset/parents
3309 3312
3310 3313 $ hg log -T '{rev} p: {revset("p1(%s)", rev) % "{rev}:{node|short}"}\n'
General Comments 0
You need to be logged in to leave comments. Login now