Mercurial > hg
view tests/test-template-filters.t @ 38224:61cecab0cc20
templater: inline unwrapvalue()
The current unwrapvalue() will be superseded by _unwrapvalue().
Note that _unwrapvalue() can simply return thing.tovalue() if thing is a
wrapped object. That's because tovalue() is guaranteed to not return a
generator of strings.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Wed, 04 Apr 2018 21:01:21 +0900 |
parents | 56dd15178190 |
children | fabfbbf4dee2 |
line wrap: on
line source
$ hg debugtemplate '{""|splitlines|commonprefix}\n' $ hg debugtemplate '{"foo/bar\nfoo/baz\nfoo/foobar\n"|splitlines|commonprefix}\n' foo $ hg debugtemplate '{"foo/bar\nfoo/bar\n"|splitlines|commonprefix}\n' foo $ hg debugtemplate '{"/foo/bar\n/foo/bar\n"|splitlines|commonprefix}\n' foo $ hg debugtemplate '{"/foo\n/foo\n"|splitlines|commonprefix}\n' $ hg debugtemplate '{"foo/bar\nbar/baz"|splitlines|commonprefix}\n' $ hg debugtemplate '{"foo/bar\nbar/baz\nbar/foo\n"|splitlines|commonprefix}\n' $ hg debugtemplate '{"foo/../bar\nfoo/bar"|splitlines|commonprefix}\n' foo $ hg debugtemplate '{"foo\n/foo"|splitlines|commonprefix}\n' $ hg init $ hg log -r null -T '{rev|commonprefix}' hg: parse error: argument is not a list of text (template filter 'commonprefix' is not compatible with keyword 'rev') [255]