tests/test-command-template.t
changeset 22844 1533e642262d
parent 22766 0ded0f0b1c04
parent 22843 b6531d806de8
child 23453 341e4798c24d
child 23734 f4e6475950f1
equal deleted inserted replaced
22841:18b3869179f9 22844:1533e642262d
  2294   1------------------- {node|short}
  2294   1------------------- {node|short}
  2295   0------------------- test
  2295   0------------------- test
  2296 
  2296 
  2297 Test ifcontains function
  2297 Test ifcontains function
  2298 
  2298 
       
  2299   $ hg log --template '{rev} {ifcontains(rev, "2 two 0", "is in the string", "is not")}\n'
       
  2300   2 is in the string
       
  2301   1 is not
       
  2302   0 is in the string
       
  2303 
  2299   $ hg log --template '{rev} {ifcontains("a", file_adds, "added a", "did not add a")}\n'
  2304   $ hg log --template '{rev} {ifcontains("a", file_adds, "added a", "did not add a")}\n'
  2300   2 did not add a
  2305   2 did not add a
  2301   1 did not add a
  2306   1 did not add a
  2302   0 added a
  2307   0 added a
  2303 
  2308