tests/test-command-template.t
changeset 21820 cce404b0c918
parent 21540 d8fb835376d1
child 21821 4a445dc5abff
equal deleted inserted replaced
21819:816754e75f2f 21820:cce404b0c918
  1857   $ hg log -R a -r 8 --template '{join(files, if("1", if("1", ", ")))}\n'
  1857   $ hg log -R a -r 8 --template '{join(files, if("1", if("1", ", ")))}\n'
  1858   fourth, second, third
  1858   fourth, second, third
  1859   $ hg log -R a -r 8 --template '{strip(if("1", if("1", "-abc-")), if("1", if("1", "-")))}\n'
  1859   $ hg log -R a -r 8 --template '{strip(if("1", if("1", "-abc-")), if("1", if("1", "-")))}\n'
  1860   abc
  1860   abc
  1861 
  1861 
       
  1862 Test splitlines
       
  1863 
       
  1864   $ hg log -Gv -R a --template "{splitlines(desc) % 'foo {line}\n'}"
       
  1865   @  foo future
       
  1866   |
       
  1867   o  foo third
       
  1868   |
       
  1869   o  foo second
       
  1870   
       
  1871   o    foo merge
       
  1872   |\
       
  1873   | o  foo new head
       
  1874   | |
       
  1875   o |  foo new branch
       
  1876   |/
       
  1877   o  foo no user, no domain
       
  1878   |
       
  1879   o  foo no person
       
  1880   |
       
  1881   o  foo other 1
       
  1882   |  foo other 2
       
  1883   |  foo
       
  1884   |  foo other 3
       
  1885   o  foo line 1
       
  1886      foo line 2