Mercurial > hg-stable
comparison tests/test-template-keywords.t @ 39394:83f8f7b9fa60
templatekw: alias {file} of files list to {path}
This is a part of the name unification. All {path}s will be changed to
repository-absolute (i.e. canonical) paths.
https://www.mercurial-scm.org/wiki/GenericTemplatingPlan#Dictionary
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 05 Aug 2018 16:14:18 +0900 |
parents | 390287321b4b |
children | 5b1d406b39f1 |
comparison
equal
deleted
inserted
replaced
39393:a41497b5117c | 39394:83f8f7b9fa60 |
---|---|
743 $ hg add b | 743 $ hg add b |
744 $ hg mv fourth fifth | 744 $ hg mv fourth fifth |
745 $ hg rm a | 745 $ hg rm a |
746 $ hg ci -m "Modify, add, remove, rename" | 746 $ hg ci -m "Modify, add, remove, rename" |
747 | 747 |
748 Test files list: | |
749 | |
750 $ hg log -l1 -T '{join(file_mods, " ")}\n' | |
751 third | |
752 $ hg log -l1 -T '{file_mods % "{file}\n"}' | |
753 third | |
754 $ hg log -l1 -T '{file_mods % "{path}\n"}' | |
755 third | |
756 | |
757 $ hg log -l1 -T '{join(files, " ")}\n' | |
758 a b fifth fourth third | |
759 $ hg log -l1 -T '{files % "{file}\n"}' | |
760 a | |
761 b | |
762 fifth | |
763 fourth | |
764 third | |
765 $ hg log -l1 -T '{files % "{path}\n"}' | |
766 a | |
767 b | |
768 fifth | |
769 fourth | |
770 third | |
771 | |
748 Test index keyword: | 772 Test index keyword: |
749 | 773 |
750 $ hg log -l 2 -T '{index + 10}{files % " {index}:{file}"}\n' | 774 $ hg log -l 2 -T '{index + 10}{files % " {index}:{file}"}\n' |
751 10 0:a 1:b 2:fifth 3:fourth 4:third | 775 10 0:a 1:b 2:fifth 3:fourth 4:third |
752 11 0:a | 776 11 0:a |