tests/test-command-template.t
branchstable
changeset 22843 b6531d806de8
parent 22582 4fe5fa49eac8
child 22844 1533e642262d
equal deleted inserted replaced
22842:d43d116a118c 22843:b6531d806de8
  1815   1------------------- {node|short}
  1815   1------------------- {node|short}
  1816   0------------------- test
  1816   0------------------- test
  1817 
  1817 
  1818 Test ifcontains function
  1818 Test ifcontains function
  1819 
  1819 
       
  1820   $ hg log --template '{rev} {ifcontains(rev, "2 two 0", "is in the string", "is not")}\n'
       
  1821   2 is in the string
       
  1822   1 is not
       
  1823   0 is in the string
       
  1824 
  1820   $ hg log --template '{rev} {ifcontains("a", file_adds, "added a", "did not add a")}\n'
  1825   $ hg log --template '{rev} {ifcontains("a", file_adds, "added a", "did not add a")}\n'
  1821   2 did not add a
  1826   2 did not add a
  1822   1 did not add a
  1827   1 did not add a
  1823   0 added a
  1828   0 added a
  1824 
  1829