tests/test-command-template.t
changeset 22668 13e3f07d74a3
parent 22588 cd1b43226b34
child 22764 1e2f54a149e8
equal deleted inserted replaced
22667:3acc3f95548c 22668:13e3f07d74a3
  1760   $ hg commit -m future -d "`cat a`"
  1760   $ hg commit -m future -d "`cat a`"
  1761 
  1761 
  1762   $ hg log -l1 --template '{date|age}\n'
  1762   $ hg log -l1 --template '{date|age}\n'
  1763   7 years from now
  1763   7 years from now
  1764 
  1764 
       
  1765 Count filter:
       
  1766 
       
  1767   $ hg log -l1 --template '{node|count} {node|short|count}\n'
       
  1768   40 12
       
  1769 
       
  1770   $ hg log -l1 --template '{revset("null^")|count} {revset(".")|count} {revset("0::3")|count}\n'
       
  1771   0 1 4
       
  1772 
       
  1773   $ hg log -G --template '{rev}: children: {children|count}, \
       
  1774   > tags: {tags|count}, file_adds: {file_adds|count}, \
       
  1775   > ancestors: {revset("ancestors(%s)", rev)|count}'
       
  1776   @  9: children: 0, tags: 1, file_adds: 1, ancestors: 3
       
  1777   |
       
  1778   o  8: children: 1, tags: 0, file_adds: 2, ancestors: 2
       
  1779   |
       
  1780   o  7: children: 1, tags: 0, file_adds: 1, ancestors: 1
       
  1781   
       
  1782   o    6: children: 0, tags: 0, file_adds: 0, ancestors: 7
       
  1783   |\
       
  1784   | o  5: children: 1, tags: 0, file_adds: 1, ancestors: 5
       
  1785   | |
       
  1786   o |  4: children: 1, tags: 0, file_adds: 0, ancestors: 5
       
  1787   |/
       
  1788   o  3: children: 2, tags: 0, file_adds: 0, ancestors: 4
       
  1789   |
       
  1790   o  2: children: 1, tags: 0, file_adds: 1, ancestors: 3
       
  1791   |
       
  1792   o  1: children: 1, tags: 0, file_adds: 1, ancestors: 2
       
  1793   |
       
  1794   o  0: children: 1, tags: 0, file_adds: 1, ancestors: 1
       
  1795   
       
  1796 
  1765 Error on syntax:
  1797 Error on syntax:
  1766 
  1798 
  1767   $ echo 'x = "f' >> t
  1799   $ echo 'x = "f' >> t
  1768   $ hg log
  1800   $ hg log
  1769   abort: t:3: unmatched quotes
  1801   abort: t:3: unmatched quotes