Mercurial > public > mercurial-scm > hg
diff tests/test-command-template.t @ 26234:e4609ec959f8
templater: switch ctx of list expression to rev of revset() (BC)
Because revset() function generates a list of revisions, it seems sensible
to switch the ctx as well where a list expression will be evaluated. I think
"{revset(...) % "..."}" expression wasn't considered well when it was
introduced at cda9d2b6beab.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 12 Sep 2015 00:21:41 +0900 |
parents | 3095b1027661 |
children | 43bf9471fae9 |
line wrap: on
line diff
--- a/tests/test-command-template.t Thu Sep 10 23:32:36 2015 +0900 +++ b/tests/test-command-template.t Sat Sep 12 00:21:41 2015 +0900 @@ -3234,6 +3234,23 @@ $ hg log --template '{revset("TIP"|lower)}\n' -l1 2 + a list template is evaluated for each item of revset + + $ hg log -T '{rev} p: {revset("p1(%s)", rev) % "{rev}:{node|short}"}\n' + 2 p: 1:bcc7ff960b8e + 1 p: 0:f7769ec2ab97 + 0 p: + + therefore, 'revcache' should be recreated for each rev + + $ hg log -T '{rev} {file_adds}\np {revset("p1(%s)", rev) % "{file_adds}"}\n' + 2 aa b + p + 1 + p a + 0 a + p + Test active bookmark templating $ hg book foo