tests/test-command-template.t
changeset 37227 9bcf096a2da2
parent 37223 08e042f0a67c
child 37229 05db42732fce
equal deleted inserted replaced
37226:920589f52be9 37227:9bcf096a2da2
  2804   1577872860.00
  2804   1577872860.00
  2805 
  2805 
  2806 Behind the scenes, this will throw a ValueError
  2806 Behind the scenes, this will throw a ValueError
  2807 
  2807 
  2808   $ hg log -l 3 --template 'line: {desc|shortdate}\n'
  2808   $ hg log -l 3 --template 'line: {desc|shortdate}\n'
  2809   abort: template filter 'shortdate' is not compatible with keyword 'desc'
  2809   hg: parse error: invalid date: 'Modify, add, remove, rename'
       
  2810   (template filter 'shortdate' is not compatible with keyword 'desc')
  2810   [255]
  2811   [255]
  2811 
  2812 
  2812 Behind the scenes, this would throw AttributeError without intype=bytes
  2813 Behind the scenes, this would throw AttributeError without intype=bytes
  2813 
  2814 
  2814   $ hg log -l 3 --template 'line: {date|escape}\n'
  2815   $ hg log -l 3 --template 'line: {date|escape}\n'
  2825   $ hg tip --template '{author|email|date}\n'
  2826   $ hg tip --template '{author|email|date}\n'
  2826   hg: parse error: date expects a date information
  2827   hg: parse error: date expects a date information
  2827   [255]
  2828   [255]
  2828 
  2829 
  2829   $ hg tip -T '{author|email|shortdate}\n'
  2830   $ hg tip -T '{author|email|shortdate}\n'
  2830   abort: template filter 'shortdate' is not compatible with keyword 'author'
  2831   hg: parse error: invalid date: 'test'
       
  2832   (template filter 'shortdate' is not compatible with keyword 'author')
  2831   [255]
  2833   [255]
  2832 
  2834 
  2833   $ hg tip -T '{get(extras, "branch")|shortdate}\n'
  2835   $ hg tip -T '{get(extras, "branch")|shortdate}\n'
  2834   abort: incompatible use of template filter 'shortdate'
  2836   hg: parse error: invalid date: 'default'
       
  2837   (incompatible use of template filter 'shortdate')
  2835   [255]
  2838   [255]
  2836 
  2839 
  2837 Error in nested template:
  2840 Error in nested template:
  2838 
  2841 
  2839   $ hg log -T '{"date'
  2842   $ hg log -T '{"date'