tests/test-command-template.t
changeset 28349 7cb2f2438f85
parent 28346 542d200bd261
child 28373 9a9dd71e882c
equal deleted inserted replaced
28348:ccedb17a5657 28349:7cb2f2438f85
  2788 Test new-style inline templating:
  2788 Test new-style inline templating:
  2789 
  2789 
  2790   $ hg log -R latesttag -r tip --template 'modified files: {file_mods % " {file}\n"}\n'
  2790   $ hg log -R latesttag -r tip --template 'modified files: {file_mods % " {file}\n"}\n'
  2791   modified files:  .hgtags
  2791   modified files:  .hgtags
  2792   
  2792   
       
  2793 
       
  2794   $ hg log -R latesttag -r tip -T '{rev % "a"}\n'
       
  2795   hg: parse error: keyword 'rev' is not iterable
       
  2796   [255]
       
  2797   $ hg log -R latesttag -r tip -T '{get(extras, "unknown") % "a"}\n'
       
  2798   hg: parse error: None is not iterable
       
  2799   [255]
       
  2800 
  2793 Test the sub function of templating for expansion:
  2801 Test the sub function of templating for expansion:
  2794 
  2802 
  2795   $ hg log -R latesttag -r 10 --template '{sub("[0-9]", "x", "{rev}")}\n'
  2803   $ hg log -R latesttag -r 10 --template '{sub("[0-9]", "x", "{rev}")}\n'
  2796   xx
  2804   xx
  2797 
  2805