Mercurial > public > mercurial-scm > hg
diff tests/test-command-template.t @ 30083:bd1f043d1ea3
templater: add relpath() to convert repo path to relative path (issue5394)
File paths in template are repository-absolute paths. This function can be
used to convert them to filesystem paths relative to cwd. This also converts
'/' to '\\' on Windows.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 08 Oct 2016 15:24:26 +0200 |
parents | e83f89d3b1f7 |
children | d1f5f158768e |
line wrap: on
line diff
--- a/tests/test-command-template.t Sat Oct 08 19:11:19 2016 +0200 +++ b/tests/test-command-template.t Sat Oct 08 15:24:26 2016 +0200 @@ -3521,6 +3521,15 @@ 0 +Test relpath function + + $ hg log -r0 -T '{files % "{file|relpath}\n"}' + a + $ cd .. + $ hg log -R r -r0 -T '{files % "{file|relpath}\n"}' + r/a (glob) + $ cd r + Test active bookmark templating $ hg book foo