tests/test-command-template.t
changeset 12283 850e089eb41c
parent 11656 83eb6b1465bf
child 12316 4134686b83e1
equal deleted inserted replaced
12282:9e457c3f47d9 12283:850e089eb41c
       
     1   $ hg init a
       
     2   $ cd a
       
     3   $ echo a > a
       
     4   $ hg add a
       
     5   $ echo line 1 > b
       
     6   $ echo line 2 >> b
       
     7   $ hg commit -l b -d '1000000 0' -u 'User Name <user@hostname>'
       
     8 
       
     9   $ hg add b
       
    10   $ echo other 1 > c
       
    11   $ echo other 2 >> c
       
    12   $ echo >> c
       
    13   $ echo other 3 >> c
       
    14   $ hg commit -l c -d '1100000 0' -u 'A. N. Other <other@place>'
       
    15 
       
    16   $ hg add c
       
    17   $ hg commit -m 'no person' -d '1200000 0' -u 'other@place'
       
    18   $ echo c >> c
       
    19   $ hg commit -m 'no user, no domain' -d '1300000 0' -u 'person'
       
    20 
       
    21   $ echo foo > .hg/branch
       
    22   $ hg commit -m 'new branch' -d '1400000 0' -u 'person'
       
    23 
       
    24   $ hg co -q 3
       
    25   $ echo other 4 >> d
       
    26   $ hg add d
       
    27   $ hg commit -m 'new head' -d '1500000 0' -u 'person'
       
    28 
       
    29   $ hg merge -q foo
       
    30   $ hg commit -m 'merge' -d '1500001 0' -u 'person'
       
    31 
       
    32 Second branch starting at nullrev:
       
    33 
       
    34   $ hg update null
       
    35   0 files updated, 0 files merged, 4 files removed, 0 files unresolved
       
    36   $ echo second > second
       
    37   $ hg add second
       
    38   $ hg commit -m second -d '1000000 0' -u 'User Name <user@hostname>'
       
    39   created new head
       
    40 
       
    41   $ echo third > third
       
    42   $ hg add third
       
    43   $ hg mv second fourth
       
    44   $ hg commit -m third -d "2020-01-01 10:01"
       
    45 
       
    46 Make sure user/global hgrc does not affect tests
       
    47 
       
    48   $ echo '[ui]' > .hg/hgrc
       
    49   $ echo 'logtemplate =' >> .hg/hgrc
       
    50   $ echo 'style =' >> .hg/hgrc
       
    51 
       
    52 Default style is like normal output:
       
    53 
       
    54   $ hg log > log.out
       
    55   $ hg log --style default > style.out
       
    56   $ cmp log.out style.out || diff -u log.out style.out
       
    57 
       
    58   $ hg log -v > log.out
       
    59   $ hg log -v --style default > style.out
       
    60   $ cmp log.out style.out || diff -u log.out style.out
       
    61 
       
    62   $ hg log --debug > log.out
       
    63   $ hg log --debug --style default > style.out
       
    64   $ cmp log.out style.out || diff -u log.out style.out
       
    65 
       
    66 Revision with no copies (used to print a traceback):
       
    67 
       
    68   $ hg tip -v --template '\n'
       
    69   
       
    70 
       
    71 Compact style works:
       
    72 
       
    73   $ hg log --style compact
       
    74   8[tip]   95c24699272e   2020-01-01 10:01 +0000   test
       
    75     third
       
    76   
       
    77   7:-1   29114dbae42b   1970-01-12 13:46 +0000   user
       
    78     second
       
    79   
       
    80   6:5,4   c7b487c6c50e   1970-01-18 08:40 +0000   person
       
    81     merge
       
    82   
       
    83   5:3   13207e5a10d9   1970-01-18 08:40 +0000   person
       
    84     new head
       
    85   
       
    86   4   32a18f097fcc   1970-01-17 04:53 +0000   person
       
    87     new branch
       
    88   
       
    89   3   10e46f2dcbf4   1970-01-16 01:06 +0000   person
       
    90     no user, no domain
       
    91   
       
    92   2   97054abb4ab8   1970-01-14 21:20 +0000   other
       
    93     no person
       
    94   
       
    95   1   b608e9d1a3f0   1970-01-13 17:33 +0000   other
       
    96     other 1
       
    97   
       
    98   0   1e4e1b8f71e0   1970-01-12 13:46 +0000   user
       
    99     line 1
       
   100   
       
   101 
       
   102   $ hg log -v --style compact
       
   103   8[tip]   95c24699272e   2020-01-01 10:01 +0000   test
       
   104     third
       
   105   
       
   106   7:-1   29114dbae42b   1970-01-12 13:46 +0000   User Name <user@hostname>
       
   107     second
       
   108   
       
   109   6:5,4   c7b487c6c50e   1970-01-18 08:40 +0000   person
       
   110     merge
       
   111   
       
   112   5:3   13207e5a10d9   1970-01-18 08:40 +0000   person
       
   113     new head
       
   114   
       
   115   4   32a18f097fcc   1970-01-17 04:53 +0000   person
       
   116     new branch
       
   117   
       
   118   3   10e46f2dcbf4   1970-01-16 01:06 +0000   person
       
   119     no user, no domain
       
   120   
       
   121   2   97054abb4ab8   1970-01-14 21:20 +0000   other@place
       
   122     no person
       
   123   
       
   124   1   b608e9d1a3f0   1970-01-13 17:33 +0000   A. N. Other <other@place>
       
   125     other 1
       
   126   other 2
       
   127   
       
   128   other 3
       
   129   
       
   130   0   1e4e1b8f71e0   1970-01-12 13:46 +0000   User Name <user@hostname>
       
   131     line 1
       
   132   line 2
       
   133   
       
   134 
       
   135   $ hg log --debug --style compact
       
   136   8[tip]:7,-1   95c24699272e   2020-01-01 10:01 +0000   test
       
   137     third
       
   138   
       
   139   7:-1,-1   29114dbae42b   1970-01-12 13:46 +0000   User Name <user@hostname>
       
   140     second
       
   141   
       
   142   6:5,4   c7b487c6c50e   1970-01-18 08:40 +0000   person
       
   143     merge
       
   144   
       
   145   5:3,-1   13207e5a10d9   1970-01-18 08:40 +0000   person
       
   146     new head
       
   147   
       
   148   4:3,-1   32a18f097fcc   1970-01-17 04:53 +0000   person
       
   149     new branch
       
   150   
       
   151   3:2,-1   10e46f2dcbf4   1970-01-16 01:06 +0000   person
       
   152     no user, no domain
       
   153   
       
   154   2:1,-1   97054abb4ab8   1970-01-14 21:20 +0000   other@place
       
   155     no person
       
   156   
       
   157   1:0,-1   b608e9d1a3f0   1970-01-13 17:33 +0000   A. N. Other <other@place>
       
   158     other 1
       
   159   other 2
       
   160   
       
   161   other 3
       
   162   
       
   163   0:-1,-1   1e4e1b8f71e0   1970-01-12 13:46 +0000   User Name <user@hostname>
       
   164     line 1
       
   165   line 2
       
   166   
       
   167 
       
   168 Test xml styles:
       
   169 
       
   170   $ hg log --style xml
       
   171   <?xml version="1.0"?>
       
   172   <log>
       
   173   <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
       
   174   <tag>tip</tag>
       
   175   <author email="test">test</author>
       
   176   <date>2020-01-01T10:01:00+00:00</date>
       
   177   <msg xml:space="preserve">third</msg>
       
   178   </logentry>
       
   179   <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
       
   180   <parent revision="-1" node="0000000000000000000000000000000000000000" />
       
   181   <author email="user@hostname">User Name</author>
       
   182   <date>1970-01-12T13:46:40+00:00</date>
       
   183   <msg xml:space="preserve">second</msg>
       
   184   </logentry>
       
   185   <logentry revision="6" node="c7b487c6c50ef1cf464cafdc4f4f5e615fc5999f">
       
   186   <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
       
   187   <parent revision="4" node="32a18f097fcccf76ef282f62f8a85b3adf8d13c4" />
       
   188   <author email="person">person</author>
       
   189   <date>1970-01-18T08:40:01+00:00</date>
       
   190   <msg xml:space="preserve">merge</msg>
       
   191   </logentry>
       
   192   <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
       
   193   <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
       
   194   <author email="person">person</author>
       
   195   <date>1970-01-18T08:40:00+00:00</date>
       
   196   <msg xml:space="preserve">new head</msg>
       
   197   </logentry>
       
   198   <logentry revision="4" node="32a18f097fcccf76ef282f62f8a85b3adf8d13c4">
       
   199   <branch>foo</branch>
       
   200   <author email="person">person</author>
       
   201   <date>1970-01-17T04:53:20+00:00</date>
       
   202   <msg xml:space="preserve">new branch</msg>
       
   203   </logentry>
       
   204   <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
       
   205   <author email="person">person</author>
       
   206   <date>1970-01-16T01:06:40+00:00</date>
       
   207   <msg xml:space="preserve">no user, no domain</msg>
       
   208   </logentry>
       
   209   <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
       
   210   <author email="other@place">other</author>
       
   211   <date>1970-01-14T21:20:00+00:00</date>
       
   212   <msg xml:space="preserve">no person</msg>
       
   213   </logentry>
       
   214   <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
       
   215   <author email="other@place">A. N. Other</author>
       
   216   <date>1970-01-13T17:33:20+00:00</date>
       
   217   <msg xml:space="preserve">other 1
       
   218   other 2
       
   219   
       
   220   other 3</msg>
       
   221   </logentry>
       
   222   <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
       
   223   <author email="user@hostname">User Name</author>
       
   224   <date>1970-01-12T13:46:40+00:00</date>
       
   225   <msg xml:space="preserve">line 1
       
   226   line 2</msg>
       
   227   </logentry>
       
   228   </log>
       
   229 
       
   230   $ hg log -v --style xml
       
   231   <?xml version="1.0"?>
       
   232   <log>
       
   233   <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
       
   234   <tag>tip</tag>
       
   235   <author email="test">test</author>
       
   236   <date>2020-01-01T10:01:00+00:00</date>
       
   237   <msg xml:space="preserve">third</msg>
       
   238   <paths>
       
   239   <path action="A">fourth</path>
       
   240   <path action="A">third</path>
       
   241   <path action="R">second</path>
       
   242   </paths>
       
   243   <copies>
       
   244   <copy source="second">fourth</copy>
       
   245   </copies>
       
   246   </logentry>
       
   247   <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
       
   248   <parent revision="-1" node="0000000000000000000000000000000000000000" />
       
   249   <author email="user@hostname">User Name</author>
       
   250   <date>1970-01-12T13:46:40+00:00</date>
       
   251   <msg xml:space="preserve">second</msg>
       
   252   <paths>
       
   253   <path action="A">second</path>
       
   254   </paths>
       
   255   </logentry>
       
   256   <logentry revision="6" node="c7b487c6c50ef1cf464cafdc4f4f5e615fc5999f">
       
   257   <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
       
   258   <parent revision="4" node="32a18f097fcccf76ef282f62f8a85b3adf8d13c4" />
       
   259   <author email="person">person</author>
       
   260   <date>1970-01-18T08:40:01+00:00</date>
       
   261   <msg xml:space="preserve">merge</msg>
       
   262   <paths>
       
   263   </paths>
       
   264   </logentry>
       
   265   <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
       
   266   <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
       
   267   <author email="person">person</author>
       
   268   <date>1970-01-18T08:40:00+00:00</date>
       
   269   <msg xml:space="preserve">new head</msg>
       
   270   <paths>
       
   271   <path action="A">d</path>
       
   272   </paths>
       
   273   </logentry>
       
   274   <logentry revision="4" node="32a18f097fcccf76ef282f62f8a85b3adf8d13c4">
       
   275   <branch>foo</branch>
       
   276   <author email="person">person</author>
       
   277   <date>1970-01-17T04:53:20+00:00</date>
       
   278   <msg xml:space="preserve">new branch</msg>
       
   279   <paths>
       
   280   </paths>
       
   281   </logentry>
       
   282   <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
       
   283   <author email="person">person</author>
       
   284   <date>1970-01-16T01:06:40+00:00</date>
       
   285   <msg xml:space="preserve">no user, no domain</msg>
       
   286   <paths>
       
   287   <path action="M">c</path>
       
   288   </paths>
       
   289   </logentry>
       
   290   <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
       
   291   <author email="other@place">other</author>
       
   292   <date>1970-01-14T21:20:00+00:00</date>
       
   293   <msg xml:space="preserve">no person</msg>
       
   294   <paths>
       
   295   <path action="A">c</path>
       
   296   </paths>
       
   297   </logentry>
       
   298   <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
       
   299   <author email="other@place">A. N. Other</author>
       
   300   <date>1970-01-13T17:33:20+00:00</date>
       
   301   <msg xml:space="preserve">other 1
       
   302   other 2
       
   303   
       
   304   other 3</msg>
       
   305   <paths>
       
   306   <path action="A">b</path>
       
   307   </paths>
       
   308   </logentry>
       
   309   <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
       
   310   <author email="user@hostname">User Name</author>
       
   311   <date>1970-01-12T13:46:40+00:00</date>
       
   312   <msg xml:space="preserve">line 1
       
   313   line 2</msg>
       
   314   <paths>
       
   315   <path action="A">a</path>
       
   316   </paths>
       
   317   </logentry>
       
   318   </log>
       
   319 
       
   320   $ hg log --debug --style xml
       
   321   <?xml version="1.0"?>
       
   322   <log>
       
   323   <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
       
   324   <tag>tip</tag>
       
   325   <parent revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453" />
       
   326   <parent revision="-1" node="0000000000000000000000000000000000000000" />
       
   327   <author email="test">test</author>
       
   328   <date>2020-01-01T10:01:00+00:00</date>
       
   329   <msg xml:space="preserve">third</msg>
       
   330   <paths>
       
   331   <path action="A">fourth</path>
       
   332   <path action="A">third</path>
       
   333   <path action="R">second</path>
       
   334   </paths>
       
   335   <copies>
       
   336   <copy source="second">fourth</copy>
       
   337   </copies>
       
   338   <extra key="branch">default</extra>
       
   339   </logentry>
       
   340   <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
       
   341   <parent revision="-1" node="0000000000000000000000000000000000000000" />
       
   342   <parent revision="-1" node="0000000000000000000000000000000000000000" />
       
   343   <author email="user@hostname">User Name</author>
       
   344   <date>1970-01-12T13:46:40+00:00</date>
       
   345   <msg xml:space="preserve">second</msg>
       
   346   <paths>
       
   347   <path action="A">second</path>
       
   348   </paths>
       
   349   <extra key="branch">default</extra>
       
   350   </logentry>
       
   351   <logentry revision="6" node="c7b487c6c50ef1cf464cafdc4f4f5e615fc5999f">
       
   352   <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
       
   353   <parent revision="4" node="32a18f097fcccf76ef282f62f8a85b3adf8d13c4" />
       
   354   <author email="person">person</author>
       
   355   <date>1970-01-18T08:40:01+00:00</date>
       
   356   <msg xml:space="preserve">merge</msg>
       
   357   <paths>
       
   358   </paths>
       
   359   <extra key="branch">default</extra>
       
   360   </logentry>
       
   361   <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
       
   362   <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
       
   363   <parent revision="-1" node="0000000000000000000000000000000000000000" />
       
   364   <author email="person">person</author>
       
   365   <date>1970-01-18T08:40:00+00:00</date>
       
   366   <msg xml:space="preserve">new head</msg>
       
   367   <paths>
       
   368   <path action="A">d</path>
       
   369   </paths>
       
   370   <extra key="branch">default</extra>
       
   371   </logentry>
       
   372   <logentry revision="4" node="32a18f097fcccf76ef282f62f8a85b3adf8d13c4">
       
   373   <branch>foo</branch>
       
   374   <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
       
   375   <parent revision="-1" node="0000000000000000000000000000000000000000" />
       
   376   <author email="person">person</author>
       
   377   <date>1970-01-17T04:53:20+00:00</date>
       
   378   <msg xml:space="preserve">new branch</msg>
       
   379   <paths>
       
   380   </paths>
       
   381   <extra key="branch">foo</extra>
       
   382   </logentry>
       
   383   <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
       
   384   <parent revision="2" node="97054abb4ab824450e9164180baf491ae0078465" />
       
   385   <parent revision="-1" node="0000000000000000000000000000000000000000" />
       
   386   <author email="person">person</author>
       
   387   <date>1970-01-16T01:06:40+00:00</date>
       
   388   <msg xml:space="preserve">no user, no domain</msg>
       
   389   <paths>
       
   390   <path action="M">c</path>
       
   391   </paths>
       
   392   <extra key="branch">default</extra>
       
   393   </logentry>
       
   394   <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
       
   395   <parent revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965" />
       
   396   <parent revision="-1" node="0000000000000000000000000000000000000000" />
       
   397   <author email="other@place">other</author>
       
   398   <date>1970-01-14T21:20:00+00:00</date>
       
   399   <msg xml:space="preserve">no person</msg>
       
   400   <paths>
       
   401   <path action="A">c</path>
       
   402   </paths>
       
   403   <extra key="branch">default</extra>
       
   404   </logentry>
       
   405   <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
       
   406   <parent revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f" />
       
   407   <parent revision="-1" node="0000000000000000000000000000000000000000" />
       
   408   <author email="other@place">A. N. Other</author>
       
   409   <date>1970-01-13T17:33:20+00:00</date>
       
   410   <msg xml:space="preserve">other 1
       
   411   other 2
       
   412   
       
   413   other 3</msg>
       
   414   <paths>
       
   415   <path action="A">b</path>
       
   416   </paths>
       
   417   <extra key="branch">default</extra>
       
   418   </logentry>
       
   419   <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
       
   420   <parent revision="-1" node="0000000000000000000000000000000000000000" />
       
   421   <parent revision="-1" node="0000000000000000000000000000000000000000" />
       
   422   <author email="user@hostname">User Name</author>
       
   423   <date>1970-01-12T13:46:40+00:00</date>
       
   424   <msg xml:space="preserve">line 1
       
   425   line 2</msg>
       
   426   <paths>
       
   427   <path action="A">a</path>
       
   428   </paths>
       
   429   <extra key="branch">default</extra>
       
   430   </logentry>
       
   431   </log>
       
   432 
       
   433 
       
   434 Error if style not readable:
       
   435 
       
   436   $ touch q
       
   437   $ chmod 0 q
       
   438   $ hg log --style ./q
       
   439   abort: Permission denied: ./q
       
   440 
       
   441 Error if no style:
       
   442 
       
   443   $ hg log --style notexist
       
   444   abort: style not found: notexist
       
   445 
       
   446 Error if style missing key:
       
   447 
       
   448   $ echo 'q = q' > t
       
   449   $ hg log --style ./t
       
   450   abort: ./t: no key named 'changeset'
       
   451 
       
   452 Error if include fails:
       
   453 
       
   454   $ echo 'changeset = q' >> t
       
   455   $ hg log --style ./t
       
   456   abort: template file ./q: Permission denied
       
   457 
       
   458 Include works:
       
   459 
       
   460   $ rm q
       
   461   $ echo '{rev}' > q
       
   462   $ hg log --style ./t
       
   463   8
       
   464   7
       
   465   6
       
   466   5
       
   467   4
       
   468   3
       
   469   2
       
   470   1
       
   471   0
       
   472 
       
   473 ui.style works:
       
   474 
       
   475   $ echo '[ui]' > .hg/hgrc
       
   476   $ echo 'style = t' >> .hg/hgrc
       
   477   $ hg log
       
   478   8
       
   479   7
       
   480   6
       
   481   5
       
   482   4
       
   483   3
       
   484   2
       
   485   1
       
   486   0
       
   487 
       
   488 
       
   489 Issue338:
       
   490 
       
   491   $ hg log --style=changelog > changelog
       
   492 
       
   493   $ cat changelog
       
   494   2020-01-01  test  <test>
       
   495   
       
   496   	* fourth, second, third:
       
   497   	third
       
   498   	[95c24699272e] [tip]
       
   499   
       
   500   1970-01-12  User Name  <user@hostname>
       
   501   
       
   502   	* second:
       
   503   	second
       
   504   	[29114dbae42b]
       
   505   
       
   506   1970-01-18  person  <person>
       
   507   
       
   508   	* merge
       
   509   	[c7b487c6c50e]
       
   510   
       
   511   	* d:
       
   512   	new head
       
   513   	[13207e5a10d9]
       
   514   
       
   515   1970-01-17  person  <person>
       
   516   
       
   517   	* new branch
       
   518   	[32a18f097fcc] <foo>
       
   519   
       
   520   1970-01-16  person  <person>
       
   521   
       
   522   	* c:
       
   523   	no user, no domain
       
   524   	[10e46f2dcbf4]
       
   525   
       
   526   1970-01-14  other  <other@place>
       
   527   
       
   528   	* c:
       
   529   	no person
       
   530   	[97054abb4ab8]
       
   531   
       
   532   1970-01-13  A. N. Other  <other@place>
       
   533   
       
   534   	* b:
       
   535   	other 1 other 2
       
   536   
       
   537   	other 3
       
   538   	[b608e9d1a3f0]
       
   539   
       
   540   1970-01-12  User Name  <user@hostname>
       
   541   
       
   542   	* a:
       
   543   	line 1 line 2
       
   544   	[1e4e1b8f71e0]
       
   545   
       
   546 
       
   547 Issue 2130:
       
   548 
       
   549   $ hg heads --style changelog
       
   550   2020-01-01  test  <test>
       
   551   
       
   552   	* fourth, second, third:
       
   553   	third
       
   554   	[95c24699272e] [tip]
       
   555   
       
   556   1970-01-18  person  <person>
       
   557   
       
   558   	* merge
       
   559   	[c7b487c6c50e]
       
   560   
       
   561   1970-01-17  person  <person>
       
   562   
       
   563   	* new branch
       
   564   	[32a18f097fcc] <foo>
       
   565   
       
   566 
       
   567 Keys work:
       
   568 
       
   569   $ for key in author branches date desc file_adds file_dels file_mods \
       
   570   >         file_copies file_copies_switch files \
       
   571   >         manifest node parents rev tags diffstat extras; do
       
   572   >     for mode in '' --verbose --debug; do
       
   573   >         hg log $mode --template "$key$mode: {$key}\n"
       
   574   >     done
       
   575   > done
       
   576   author: test
       
   577   author: User Name <user@hostname>
       
   578   author: person
       
   579   author: person
       
   580   author: person
       
   581   author: person
       
   582   author: other@place
       
   583   author: A. N. Other <other@place>
       
   584   author: User Name <user@hostname>
       
   585   author--verbose: test
       
   586   author--verbose: User Name <user@hostname>
       
   587   author--verbose: person
       
   588   author--verbose: person
       
   589   author--verbose: person
       
   590   author--verbose: person
       
   591   author--verbose: other@place
       
   592   author--verbose: A. N. Other <other@place>
       
   593   author--verbose: User Name <user@hostname>
       
   594   author--debug: test
       
   595   author--debug: User Name <user@hostname>
       
   596   author--debug: person
       
   597   author--debug: person
       
   598   author--debug: person
       
   599   author--debug: person
       
   600   author--debug: other@place
       
   601   author--debug: A. N. Other <other@place>
       
   602   author--debug: User Name <user@hostname>
       
   603   branches: 
       
   604   branches: 
       
   605   branches: 
       
   606   branches: 
       
   607   branches: foo
       
   608   branches: 
       
   609   branches: 
       
   610   branches: 
       
   611   branches: 
       
   612   branches--verbose: 
       
   613   branches--verbose: 
       
   614   branches--verbose: 
       
   615   branches--verbose: 
       
   616   branches--verbose: foo
       
   617   branches--verbose: 
       
   618   branches--verbose: 
       
   619   branches--verbose: 
       
   620   branches--verbose: 
       
   621   branches--debug: 
       
   622   branches--debug: 
       
   623   branches--debug: 
       
   624   branches--debug: 
       
   625   branches--debug: foo
       
   626   branches--debug: 
       
   627   branches--debug: 
       
   628   branches--debug: 
       
   629   branches--debug: 
       
   630   date: 1577872860.00
       
   631   date: 1000000.00
       
   632   date: 1500001.00
       
   633   date: 1500000.00
       
   634   date: 1400000.00
       
   635   date: 1300000.00
       
   636   date: 1200000.00
       
   637   date: 1100000.00
       
   638   date: 1000000.00
       
   639   date--verbose: 1577872860.00
       
   640   date--verbose: 1000000.00
       
   641   date--verbose: 1500001.00
       
   642   date--verbose: 1500000.00
       
   643   date--verbose: 1400000.00
       
   644   date--verbose: 1300000.00
       
   645   date--verbose: 1200000.00
       
   646   date--verbose: 1100000.00
       
   647   date--verbose: 1000000.00
       
   648   date--debug: 1577872860.00
       
   649   date--debug: 1000000.00
       
   650   date--debug: 1500001.00
       
   651   date--debug: 1500000.00
       
   652   date--debug: 1400000.00
       
   653   date--debug: 1300000.00
       
   654   date--debug: 1200000.00
       
   655   date--debug: 1100000.00
       
   656   date--debug: 1000000.00
       
   657   desc: third
       
   658   desc: second
       
   659   desc: merge
       
   660   desc: new head
       
   661   desc: new branch
       
   662   desc: no user, no domain
       
   663   desc: no person
       
   664   desc: other 1
       
   665   other 2
       
   666   
       
   667   other 3
       
   668   desc: line 1
       
   669   line 2
       
   670   desc--verbose: third
       
   671   desc--verbose: second
       
   672   desc--verbose: merge
       
   673   desc--verbose: new head
       
   674   desc--verbose: new branch
       
   675   desc--verbose: no user, no domain
       
   676   desc--verbose: no person
       
   677   desc--verbose: other 1
       
   678   other 2
       
   679   
       
   680   other 3
       
   681   desc--verbose: line 1
       
   682   line 2
       
   683   desc--debug: third
       
   684   desc--debug: second
       
   685   desc--debug: merge
       
   686   desc--debug: new head
       
   687   desc--debug: new branch
       
   688   desc--debug: no user, no domain
       
   689   desc--debug: no person
       
   690   desc--debug: other 1
       
   691   other 2
       
   692   
       
   693   other 3
       
   694   desc--debug: line 1
       
   695   line 2
       
   696   file_adds: fourth third
       
   697   file_adds: second
       
   698   file_adds: 
       
   699   file_adds: d
       
   700   file_adds: 
       
   701   file_adds: 
       
   702   file_adds: c
       
   703   file_adds: b
       
   704   file_adds: a
       
   705   file_adds--verbose: fourth third
       
   706   file_adds--verbose: second
       
   707   file_adds--verbose: 
       
   708   file_adds--verbose: d
       
   709   file_adds--verbose: 
       
   710   file_adds--verbose: 
       
   711   file_adds--verbose: c
       
   712   file_adds--verbose: b
       
   713   file_adds--verbose: a
       
   714   file_adds--debug: fourth third
       
   715   file_adds--debug: second
       
   716   file_adds--debug: 
       
   717   file_adds--debug: d
       
   718   file_adds--debug: 
       
   719   file_adds--debug: 
       
   720   file_adds--debug: c
       
   721   file_adds--debug: b
       
   722   file_adds--debug: a
       
   723   file_dels: second
       
   724   file_dels: 
       
   725   file_dels: 
       
   726   file_dels: 
       
   727   file_dels: 
       
   728   file_dels: 
       
   729   file_dels: 
       
   730   file_dels: 
       
   731   file_dels: 
       
   732   file_dels--verbose: second
       
   733   file_dels--verbose: 
       
   734   file_dels--verbose: 
       
   735   file_dels--verbose: 
       
   736   file_dels--verbose: 
       
   737   file_dels--verbose: 
       
   738   file_dels--verbose: 
       
   739   file_dels--verbose: 
       
   740   file_dels--verbose: 
       
   741   file_dels--debug: second
       
   742   file_dels--debug: 
       
   743   file_dels--debug: 
       
   744   file_dels--debug: 
       
   745   file_dels--debug: 
       
   746   file_dels--debug: 
       
   747   file_dels--debug: 
       
   748   file_dels--debug: 
       
   749   file_dels--debug: 
       
   750   file_mods: 
       
   751   file_mods: 
       
   752   file_mods: 
       
   753   file_mods: 
       
   754   file_mods: 
       
   755   file_mods: c
       
   756   file_mods: 
       
   757   file_mods: 
       
   758   file_mods: 
       
   759   file_mods--verbose: 
       
   760   file_mods--verbose: 
       
   761   file_mods--verbose: 
       
   762   file_mods--verbose: 
       
   763   file_mods--verbose: 
       
   764   file_mods--verbose: c
       
   765   file_mods--verbose: 
       
   766   file_mods--verbose: 
       
   767   file_mods--verbose: 
       
   768   file_mods--debug: 
       
   769   file_mods--debug: 
       
   770   file_mods--debug: 
       
   771   file_mods--debug: 
       
   772   file_mods--debug: 
       
   773   file_mods--debug: c
       
   774   file_mods--debug: 
       
   775   file_mods--debug: 
       
   776   file_mods--debug: 
       
   777   file_copies: fourth (second)
       
   778   file_copies: 
       
   779   file_copies: 
       
   780   file_copies: 
       
   781   file_copies: 
       
   782   file_copies: 
       
   783   file_copies: 
       
   784   file_copies: 
       
   785   file_copies: 
       
   786   file_copies--verbose: fourth (second)
       
   787   file_copies--verbose: 
       
   788   file_copies--verbose: 
       
   789   file_copies--verbose: 
       
   790   file_copies--verbose: 
       
   791   file_copies--verbose: 
       
   792   file_copies--verbose: 
       
   793   file_copies--verbose: 
       
   794   file_copies--verbose: 
       
   795   file_copies--debug: fourth (second)
       
   796   file_copies--debug: 
       
   797   file_copies--debug: 
       
   798   file_copies--debug: 
       
   799   file_copies--debug: 
       
   800   file_copies--debug: 
       
   801   file_copies--debug: 
       
   802   file_copies--debug: 
       
   803   file_copies--debug: 
       
   804   file_copies_switch: 
       
   805   file_copies_switch: 
       
   806   file_copies_switch: 
       
   807   file_copies_switch: 
       
   808   file_copies_switch: 
       
   809   file_copies_switch: 
       
   810   file_copies_switch: 
       
   811   file_copies_switch: 
       
   812   file_copies_switch: 
       
   813   file_copies_switch--verbose: 
       
   814   file_copies_switch--verbose: 
       
   815   file_copies_switch--verbose: 
       
   816   file_copies_switch--verbose: 
       
   817   file_copies_switch--verbose: 
       
   818   file_copies_switch--verbose: 
       
   819   file_copies_switch--verbose: 
       
   820   file_copies_switch--verbose: 
       
   821   file_copies_switch--verbose: 
       
   822   file_copies_switch--debug: 
       
   823   file_copies_switch--debug: 
       
   824   file_copies_switch--debug: 
       
   825   file_copies_switch--debug: 
       
   826   file_copies_switch--debug: 
       
   827   file_copies_switch--debug: 
       
   828   file_copies_switch--debug: 
       
   829   file_copies_switch--debug: 
       
   830   file_copies_switch--debug: 
       
   831   files: fourth second third
       
   832   files: second
       
   833   files: 
       
   834   files: d
       
   835   files: 
       
   836   files: c
       
   837   files: c
       
   838   files: b
       
   839   files: a
       
   840   files--verbose: fourth second third
       
   841   files--verbose: second
       
   842   files--verbose: 
       
   843   files--verbose: d
       
   844   files--verbose: 
       
   845   files--verbose: c
       
   846   files--verbose: c
       
   847   files--verbose: b
       
   848   files--verbose: a
       
   849   files--debug: fourth second third
       
   850   files--debug: second
       
   851   files--debug: 
       
   852   files--debug: d
       
   853   files--debug: 
       
   854   files--debug: c
       
   855   files--debug: c
       
   856   files--debug: b
       
   857   files--debug: a
       
   858   manifest: 8:94961b75a2da
       
   859   manifest: 7:f2dbc354b94e
       
   860   manifest: 6:91015e9dbdd7
       
   861   manifest: 5:4dc3def4f9b4
       
   862   manifest: 4:90ae8dda64e1
       
   863   manifest: 3:cb5a1327723b
       
   864   manifest: 2:6e0e82995c35
       
   865   manifest: 1:4e8d705b1e53
       
   866   manifest: 0:a0c8bcbbb45c
       
   867   manifest--verbose: 8:94961b75a2da
       
   868   manifest--verbose: 7:f2dbc354b94e
       
   869   manifest--verbose: 6:91015e9dbdd7
       
   870   manifest--verbose: 5:4dc3def4f9b4
       
   871   manifest--verbose: 4:90ae8dda64e1
       
   872   manifest--verbose: 3:cb5a1327723b
       
   873   manifest--verbose: 2:6e0e82995c35
       
   874   manifest--verbose: 1:4e8d705b1e53
       
   875   manifest--verbose: 0:a0c8bcbbb45c
       
   876   manifest--debug: 8:94961b75a2da554b4df6fb599e5bfc7d48de0c64
       
   877   manifest--debug: 7:f2dbc354b94e5ec0b4f10680ee0cee816101d0bf
       
   878   manifest--debug: 6:91015e9dbdd76a6791085d12b0a0ec7fcd22ffbf
       
   879   manifest--debug: 5:4dc3def4f9b4c6e8de820f6ee74737f91e96a216
       
   880   manifest--debug: 4:90ae8dda64e1a876c792bccb9af66284f6018363
       
   881   manifest--debug: 3:cb5a1327723bada42f117e4c55a303246eaf9ccc
       
   882   manifest--debug: 2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1
       
   883   manifest--debug: 1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55
       
   884   manifest--debug: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0
       
   885   node: 95c24699272ef57d062b8bccc32c878bf841784a
       
   886   node: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
       
   887   node: c7b487c6c50ef1cf464cafdc4f4f5e615fc5999f
       
   888   node: 13207e5a10d9fd28ec424934298e176197f2c67f
       
   889   node: 32a18f097fcccf76ef282f62f8a85b3adf8d13c4
       
   890   node: 10e46f2dcbf4823578cf180f33ecf0b957964c47
       
   891   node: 97054abb4ab824450e9164180baf491ae0078465
       
   892   node: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
       
   893   node: 1e4e1b8f71e05681d422154f5421e385fec3454f
       
   894   node--verbose: 95c24699272ef57d062b8bccc32c878bf841784a
       
   895   node--verbose: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
       
   896   node--verbose: c7b487c6c50ef1cf464cafdc4f4f5e615fc5999f
       
   897   node--verbose: 13207e5a10d9fd28ec424934298e176197f2c67f
       
   898   node--verbose: 32a18f097fcccf76ef282f62f8a85b3adf8d13c4
       
   899   node--verbose: 10e46f2dcbf4823578cf180f33ecf0b957964c47
       
   900   node--verbose: 97054abb4ab824450e9164180baf491ae0078465
       
   901   node--verbose: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
       
   902   node--verbose: 1e4e1b8f71e05681d422154f5421e385fec3454f
       
   903   node--debug: 95c24699272ef57d062b8bccc32c878bf841784a
       
   904   node--debug: 29114dbae42b9f078cf2714dbe3a86bba8ec7453
       
   905   node--debug: c7b487c6c50ef1cf464cafdc4f4f5e615fc5999f
       
   906   node--debug: 13207e5a10d9fd28ec424934298e176197f2c67f
       
   907   node--debug: 32a18f097fcccf76ef282f62f8a85b3adf8d13c4
       
   908   node--debug: 10e46f2dcbf4823578cf180f33ecf0b957964c47
       
   909   node--debug: 97054abb4ab824450e9164180baf491ae0078465
       
   910   node--debug: b608e9d1a3f0273ccf70fb85fd6866b3482bf965
       
   911   node--debug: 1e4e1b8f71e05681d422154f5421e385fec3454f
       
   912   parents: 
       
   913   parents: -1:000000000000 
       
   914   parents: 5:13207e5a10d9 4:32a18f097fcc 
       
   915   parents: 3:10e46f2dcbf4 
       
   916   parents: 
       
   917   parents: 
       
   918   parents: 
       
   919   parents: 
       
   920   parents: 
       
   921   parents--verbose: 
       
   922   parents--verbose: -1:000000000000 
       
   923   parents--verbose: 5:13207e5a10d9 4:32a18f097fcc 
       
   924   parents--verbose: 3:10e46f2dcbf4 
       
   925   parents--verbose: 
       
   926   parents--verbose: 
       
   927   parents--verbose: 
       
   928   parents--verbose: 
       
   929   parents--verbose: 
       
   930   parents--debug: 7:29114dbae42b9f078cf2714dbe3a86bba8ec7453 -1:0000000000000000000000000000000000000000 
       
   931   parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000 
       
   932   parents--debug: 5:13207e5a10d9fd28ec424934298e176197f2c67f 4:32a18f097fcccf76ef282f62f8a85b3adf8d13c4 
       
   933   parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000 
       
   934   parents--debug: 3:10e46f2dcbf4823578cf180f33ecf0b957964c47 -1:0000000000000000000000000000000000000000 
       
   935   parents--debug: 2:97054abb4ab824450e9164180baf491ae0078465 -1:0000000000000000000000000000000000000000 
       
   936   parents--debug: 1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965 -1:0000000000000000000000000000000000000000 
       
   937   parents--debug: 0:1e4e1b8f71e05681d422154f5421e385fec3454f -1:0000000000000000000000000000000000000000 
       
   938   parents--debug: -1:0000000000000000000000000000000000000000 -1:0000000000000000000000000000000000000000 
       
   939   rev: 8
       
   940   rev: 7
       
   941   rev: 6
       
   942   rev: 5
       
   943   rev: 4
       
   944   rev: 3
       
   945   rev: 2
       
   946   rev: 1
       
   947   rev: 0
       
   948   rev--verbose: 8
       
   949   rev--verbose: 7
       
   950   rev--verbose: 6
       
   951   rev--verbose: 5
       
   952   rev--verbose: 4
       
   953   rev--verbose: 3
       
   954   rev--verbose: 2
       
   955   rev--verbose: 1
       
   956   rev--verbose: 0
       
   957   rev--debug: 8
       
   958   rev--debug: 7
       
   959   rev--debug: 6
       
   960   rev--debug: 5
       
   961   rev--debug: 4
       
   962   rev--debug: 3
       
   963   rev--debug: 2
       
   964   rev--debug: 1
       
   965   rev--debug: 0
       
   966   tags: tip
       
   967   tags: 
       
   968   tags: 
       
   969   tags: 
       
   970   tags: 
       
   971   tags: 
       
   972   tags: 
       
   973   tags: 
       
   974   tags: 
       
   975   tags--verbose: tip
       
   976   tags--verbose: 
       
   977   tags--verbose: 
       
   978   tags--verbose: 
       
   979   tags--verbose: 
       
   980   tags--verbose: 
       
   981   tags--verbose: 
       
   982   tags--verbose: 
       
   983   tags--verbose: 
       
   984   tags--debug: tip
       
   985   tags--debug: 
       
   986   tags--debug: 
       
   987   tags--debug: 
       
   988   tags--debug: 
       
   989   tags--debug: 
       
   990   tags--debug: 
       
   991   tags--debug: 
       
   992   tags--debug: 
       
   993   diffstat: 3: +2/-1
       
   994   diffstat: 1: +1/-0
       
   995   diffstat: 0: +0/-0
       
   996   diffstat: 1: +1/-0
       
   997   diffstat: 0: +0/-0
       
   998   diffstat: 1: +1/-0
       
   999   diffstat: 1: +4/-0
       
  1000   diffstat: 1: +2/-0
       
  1001   diffstat: 1: +1/-0
       
  1002   diffstat--verbose: 3: +2/-1
       
  1003   diffstat--verbose: 1: +1/-0
       
  1004   diffstat--verbose: 0: +0/-0
       
  1005   diffstat--verbose: 1: +1/-0
       
  1006   diffstat--verbose: 0: +0/-0
       
  1007   diffstat--verbose: 1: +1/-0
       
  1008   diffstat--verbose: 1: +4/-0
       
  1009   diffstat--verbose: 1: +2/-0
       
  1010   diffstat--verbose: 1: +1/-0
       
  1011   diffstat--debug: 3: +2/-1
       
  1012   diffstat--debug: 1: +1/-0
       
  1013   diffstat--debug: 0: +0/-0
       
  1014   diffstat--debug: 1: +1/-0
       
  1015   diffstat--debug: 0: +0/-0
       
  1016   diffstat--debug: 1: +1/-0
       
  1017   diffstat--debug: 1: +4/-0
       
  1018   diffstat--debug: 1: +2/-0
       
  1019   diffstat--debug: 1: +1/-0
       
  1020   extras: branch=default
       
  1021   extras: branch=default
       
  1022   extras: branch=default
       
  1023   extras: branch=default
       
  1024   extras: branch=foo
       
  1025   extras: branch=default
       
  1026   extras: branch=default
       
  1027   extras: branch=default
       
  1028   extras: branch=default
       
  1029   extras--verbose: branch=default
       
  1030   extras--verbose: branch=default
       
  1031   extras--verbose: branch=default
       
  1032   extras--verbose: branch=default
       
  1033   extras--verbose: branch=foo
       
  1034   extras--verbose: branch=default
       
  1035   extras--verbose: branch=default
       
  1036   extras--verbose: branch=default
       
  1037   extras--verbose: branch=default
       
  1038   extras--debug: branch=default
       
  1039   extras--debug: branch=default
       
  1040   extras--debug: branch=default
       
  1041   extras--debug: branch=default
       
  1042   extras--debug: branch=foo
       
  1043   extras--debug: branch=default
       
  1044   extras--debug: branch=default
       
  1045   extras--debug: branch=default
       
  1046   extras--debug: branch=default
       
  1047 
       
  1048 
       
  1049 Filters work:
       
  1050 
       
  1051   $ hg log --template '{author|domain}\n'
       
  1052   
       
  1053   hostname
       
  1054   
       
  1055   
       
  1056   
       
  1057   
       
  1058   place
       
  1059   place
       
  1060   hostname
       
  1061 
       
  1062   $ hg log --template '{author|person}\n'
       
  1063   test
       
  1064   User Name
       
  1065   person
       
  1066   person
       
  1067   person
       
  1068   person
       
  1069   other
       
  1070   A. N. Other
       
  1071   User Name
       
  1072 
       
  1073   $ hg log --template '{author|user}\n'
       
  1074   test
       
  1075   user
       
  1076   person
       
  1077   person
       
  1078   person
       
  1079   person
       
  1080   other
       
  1081   other
       
  1082   user
       
  1083 
       
  1084   $ hg log --template '{date|age}\n' > /dev/null || exit 1
       
  1085 
       
  1086   $ hg log -l1 --template '{date|age}\n' 
       
  1087   in the future
       
  1088   $ hg log --template '{date|date}\n'
       
  1089   Wed Jan 01 10:01:00 2020 +0000
       
  1090   Mon Jan 12 13:46:40 1970 +0000
       
  1091   Sun Jan 18 08:40:01 1970 +0000
       
  1092   Sun Jan 18 08:40:00 1970 +0000
       
  1093   Sat Jan 17 04:53:20 1970 +0000
       
  1094   Fri Jan 16 01:06:40 1970 +0000
       
  1095   Wed Jan 14 21:20:00 1970 +0000
       
  1096   Tue Jan 13 17:33:20 1970 +0000
       
  1097   Mon Jan 12 13:46:40 1970 +0000
       
  1098 
       
  1099   $ hg log --template '{date|isodate}\n'
       
  1100   2020-01-01 10:01 +0000
       
  1101   1970-01-12 13:46 +0000
       
  1102   1970-01-18 08:40 +0000
       
  1103   1970-01-18 08:40 +0000
       
  1104   1970-01-17 04:53 +0000
       
  1105   1970-01-16 01:06 +0000
       
  1106   1970-01-14 21:20 +0000
       
  1107   1970-01-13 17:33 +0000
       
  1108   1970-01-12 13:46 +0000
       
  1109 
       
  1110   $ hg log --template '{date|isodatesec}\n'
       
  1111   2020-01-01 10:01:00 +0000
       
  1112   1970-01-12 13:46:40 +0000
       
  1113   1970-01-18 08:40:01 +0000
       
  1114   1970-01-18 08:40:00 +0000
       
  1115   1970-01-17 04:53:20 +0000
       
  1116   1970-01-16 01:06:40 +0000
       
  1117   1970-01-14 21:20:00 +0000
       
  1118   1970-01-13 17:33:20 +0000
       
  1119   1970-01-12 13:46:40 +0000
       
  1120 
       
  1121   $ hg log --template '{date|rfc822date}\n'
       
  1122   Wed, 01 Jan 2020 10:01:00 +0000
       
  1123   Mon, 12 Jan 1970 13:46:40 +0000
       
  1124   Sun, 18 Jan 1970 08:40:01 +0000
       
  1125   Sun, 18 Jan 1970 08:40:00 +0000
       
  1126   Sat, 17 Jan 1970 04:53:20 +0000
       
  1127   Fri, 16 Jan 1970 01:06:40 +0000
       
  1128   Wed, 14 Jan 1970 21:20:00 +0000
       
  1129   Tue, 13 Jan 1970 17:33:20 +0000
       
  1130   Mon, 12 Jan 1970 13:46:40 +0000
       
  1131 
       
  1132   $ hg log --template '{desc|firstline}\n'
       
  1133   third
       
  1134   second
       
  1135   merge
       
  1136   new head
       
  1137   new branch
       
  1138   no user, no domain
       
  1139   no person
       
  1140   other 1
       
  1141   line 1
       
  1142 
       
  1143   $ hg log --template '{node|short}\n'
       
  1144   95c24699272e
       
  1145   29114dbae42b
       
  1146   c7b487c6c50e
       
  1147   13207e5a10d9
       
  1148   32a18f097fcc
       
  1149   10e46f2dcbf4
       
  1150   97054abb4ab8
       
  1151   b608e9d1a3f0
       
  1152   1e4e1b8f71e0
       
  1153 
       
  1154   $ hg log --template '<changeset author="{author|xmlescape}"/>\n'
       
  1155   <changeset author="test"/>
       
  1156   <changeset author="User Name &lt;user@hostname&gt;"/>
       
  1157   <changeset author="person"/>
       
  1158   <changeset author="person"/>
       
  1159   <changeset author="person"/>
       
  1160   <changeset author="person"/>
       
  1161   <changeset author="other@place"/>
       
  1162   <changeset author="A. N. Other &lt;other@place&gt;"/>
       
  1163   <changeset author="User Name &lt;user@hostname&gt;"/>
       
  1164 
       
  1165   $ hg log --template '{rev}: {children}\n'
       
  1166   8: 
       
  1167   7: 8:95c24699272e
       
  1168   6: 
       
  1169   5: 6:c7b487c6c50e
       
  1170   4: 6:c7b487c6c50e
       
  1171   3: 4:32a18f097fcc 5:13207e5a10d9
       
  1172   2: 3:10e46f2dcbf4
       
  1173   1: 2:97054abb4ab8
       
  1174   0: 1:b608e9d1a3f0
       
  1175 
       
  1176 Formatnode filter works:
       
  1177 
       
  1178   $ hg -q log -r 0 --template '{node|formatnode}\n'
       
  1179   1e4e1b8f71e0
       
  1180 
       
  1181   $ hg log -r 0 --template '{node|formatnode}\n'
       
  1182   1e4e1b8f71e0
       
  1183 
       
  1184   $ hg -v log -r 0 --template '{node|formatnode}\n'
       
  1185   1e4e1b8f71e0
       
  1186 
       
  1187   $ hg --debug log -r 0 --template '{node|formatnode}\n'
       
  1188   1e4e1b8f71e05681d422154f5421e385fec3454f
       
  1189 
       
  1190 Error on syntax:
       
  1191 
       
  1192   $ echo 'x = "f' >> t
       
  1193   $ hg log
       
  1194   abort: t:3: unmatched quotes
       
  1195 
       
  1196   $ cd ..
       
  1197 
       
  1198 
       
  1199 latesttag:
       
  1200 
       
  1201   $ hg init latesttag
       
  1202   $ cd latesttag
       
  1203 
       
  1204   $ echo a > file
       
  1205   $ hg ci -Am a -d '0 0'
       
  1206   adding file
       
  1207 
       
  1208   $ echo b >> file
       
  1209   $ hg ci -m b -d '1 0'
       
  1210 
       
  1211   $ echo c >> head1
       
  1212   $ hg ci -Am h1c -d '2 0'
       
  1213   adding head1
       
  1214 
       
  1215   $ hg update -q 1
       
  1216   $ echo d >> head2
       
  1217   $ hg ci -Am h2d -d '3 0'
       
  1218   adding head2
       
  1219   created new head
       
  1220 
       
  1221   $ echo e >> head2
       
  1222   $ hg ci -m h2e -d '4 0'
       
  1223 
       
  1224   $ hg merge -q
       
  1225   $ hg ci -m merge -d '5 0'
       
  1226 
       
  1227 No tag set:
       
  1228 
       
  1229   $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
       
  1230   5: null+5
       
  1231   4: null+4
       
  1232   3: null+3
       
  1233   2: null+3
       
  1234   1: null+2
       
  1235   0: null+1
       
  1236 
       
  1237 One common tag: longuest path wins:
       
  1238 
       
  1239   $ hg tag -r 1 -m t1 -d '6 0' t1
       
  1240   $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
       
  1241   6: t1+4
       
  1242   5: t1+3
       
  1243   4: t1+2
       
  1244   3: t1+1
       
  1245   2: t1+1
       
  1246   1: t1+0
       
  1247   0: null+1
       
  1248 
       
  1249 One ancestor tag: more recent wins:
       
  1250 
       
  1251   $ hg tag -r 2 -m t2 -d '7 0' t2
       
  1252   $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
       
  1253   7: t2+3
       
  1254   6: t2+2
       
  1255   5: t2+1
       
  1256   4: t1+2
       
  1257   3: t1+1
       
  1258   2: t2+0
       
  1259   1: t1+0
       
  1260   0: null+1
       
  1261 
       
  1262 Two branch tags: more recent wins:
       
  1263 
       
  1264   $ hg tag -r 3 -m t3 -d '8 0' t3
       
  1265   $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
       
  1266   8: t3+5
       
  1267   7: t3+4
       
  1268   6: t3+3
       
  1269   5: t3+2
       
  1270   4: t3+1
       
  1271   3: t3+0
       
  1272   2: t2+0
       
  1273   1: t1+0
       
  1274   0: null+1
       
  1275 
       
  1276 Merged tag overrides:
       
  1277 
       
  1278   $ hg tag -r 5 -m t5 -d '9 0' t5
       
  1279   $ hg tag -r 3 -m at3 -d '10 0' at3
       
  1280   $ hg log --template '{rev}: {latesttag}+{latesttagdistance}\n'
       
  1281   10: t5+5
       
  1282   9: t5+4
       
  1283   8: t5+3
       
  1284   7: t5+2
       
  1285   6: t5+1
       
  1286   5: t5+0
       
  1287   4: at3:t3+1
       
  1288   3: at3:t3+0
       
  1289   2: t2+0
       
  1290   1: t1+0
       
  1291   0: null+1
       
  1292 
       
  1293   $ cd ..
       
  1294 
       
  1295 
       
  1296 Style path expansion (issue1948):
       
  1297 
       
  1298   $ mkdir -p home/styles
       
  1299 
       
  1300   $ cat > home/styles/teststyle <<EOF
       
  1301   > changeset = 'test {rev}:{node|short}\n'
       
  1302   > EOF
       
  1303 
       
  1304   $ HOME=`pwd`/home; export HOME
       
  1305 
       
  1306   $ cat > latesttag/.hg/hgrc <<EOF
       
  1307   > [ui]
       
  1308   > style = ~/styles/teststyle
       
  1309   > EOF
       
  1310 
       
  1311   $ hg -R latesttag tip
       
  1312   test 10:dee8f28249af
       
  1313 
       
  1314 Test recursive showlist template (issue1989):
       
  1315 
       
  1316   $ cat > style1989 <<EOF
       
  1317   > changeset = '{file_mods}{manifest}{extras}'
       
  1318   > file_mod  = 'M|{author|person}\n'
       
  1319   > manifest = '{rev},{author}\n'
       
  1320   > extra = '{key}: {author}\n'
       
  1321   > EOF
       
  1322 
       
  1323   $ hg -R latesttag log -r tip --style=style1989
       
  1324   M|test
       
  1325   10,test
       
  1326   branch: test
       
  1327