Commit c5e58cfb authored by Anton Shestakov's avatar Anton Shestakov
Browse files

tests: put a common template snippet into [templates]

parent c669a08746b5
......@@ -5,6 +5,11 @@ Global setup
$ . $TESTDIR/testlib/obshistory_setup.sh
$ cat >> $HGRCPATH << EOF
> [templates]
> logmarkers = '{if(markers, join(markers % "at {date|hgdate} by {user|person} "))}'
> EOF
Test output on amended commit
=============================
......@@ -127,24 +132,24 @@ Test that content diff works with templating
x 471f378eab4c A0
$ hg obslog 4ae3a4151de9 --graph --no-origin -T'{desc|firstline} {if(markers, join(markers % "at {date|hgdate} by {user|person} "))}'
$ hg obslog 4ae3a4151de9 --graph --no-origin -T '{desc|firstline} {logmarkers}'
@ A1
|
x A0 at 0 0 by test
$ hg obslog 4ae3a4151de9 --graph -T'{desc|firstline} {if(markers, join(markers % "at {date|hgdate} by {user|person} "))}'
$ hg obslog 4ae3a4151de9 --graph -T '{desc|firstline} {logmarkers}'
@ A1 at 0 0 by test
|
x A0
Check that the same thing works with the old {shortdescription} form
$ hg obslog 4ae3a4151de9 --graph --no-origin -T'{shortdescription} {if(markers, join(markers % "at {date|hgdate} by {user|person} "))}'
$ hg obslog 4ae3a4151de9 --graph --no-origin -T '{shortdescription} {logmarkers}'
@ A1
|
x A0 at 0 0 by test
$ hg obslog 4ae3a4151de9 --graph -T'{shortdescription} {if(markers, join(markers % "at {date|hgdate} by {user|person} "))}'
$ hg obslog 4ae3a4151de9 --graph -T '{shortdescription} {logmarkers}'
@ A1 at 0 0 by test
|
x A0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment