tests/test-template-map.t
changeset 38433 ddce7bdf7f3c
parent 38427 4b73f316ba0e
child 39623 34ecc0a09c76
equal deleted inserted replaced
38432:05b7dd11918e 38433:ddce7bdf7f3c
       
     1 Test template map files and styles
       
     2 ==================================
       
     3 
       
     4   $ hg init a
       
     5   $ cd a
       
     6   $ echo a > a
       
     7   $ hg add a
       
     8   $ echo line 1 > b
       
     9   $ echo line 2 >> b
       
    10   $ hg commit -l b -d '1000000 0' -u 'User Name <user@hostname>'
       
    11 
       
    12   $ hg add b
       
    13   $ echo other 1 > c
       
    14   $ echo other 2 >> c
       
    15   $ echo >> c
       
    16   $ echo other 3 >> c
       
    17   $ hg commit -l c -d '1100000 0' -u 'A. N. Other <other@place>'
       
    18 
       
    19   $ hg add c
       
    20   $ hg commit -m 'no person' -d '1200000 0' -u 'other@place'
       
    21   $ echo c >> c
       
    22   $ hg commit -m 'no user, no domain' -d '1300000 0' -u 'person'
       
    23 
       
    24   $ echo foo > .hg/branch
       
    25   $ hg commit -m 'new branch' -d '1400000 0' -u 'person'
       
    26 
       
    27   $ hg co -q 3
       
    28   $ echo other 4 >> d
       
    29   $ hg add d
       
    30   $ hg commit -m 'new head' -d '1500000 0' -u 'person'
       
    31 
       
    32   $ hg merge -q foo
       
    33   $ hg commit -m 'merge' -d '1500001 0' -u 'person'
       
    34 
       
    35 Second branch starting at nullrev:
       
    36 
       
    37   $ hg update null
       
    38   0 files updated, 0 files merged, 4 files removed, 0 files unresolved
       
    39   $ echo second > second
       
    40   $ hg add second
       
    41   $ hg commit -m second -d '1000000 0' -u 'User Name <user@hostname>'
       
    42   created new head
       
    43 
       
    44   $ echo third > third
       
    45   $ hg add third
       
    46   $ hg mv second fourth
       
    47   $ hg commit -m third -d "2020-01-01 10:01"
       
    48 
       
    49 Make sure user/global hgrc does not affect tests
       
    50 
       
    51   $ echo '[ui]' > .hg/hgrc
       
    52   $ echo 'logtemplate =' >> .hg/hgrc
       
    53   $ echo 'style =' >> .hg/hgrc
       
    54 
       
    55 Add some simple styles to settings
       
    56 
       
    57   $ cat <<'EOF' >> .hg/hgrc
       
    58   > [templates]
       
    59   > simple = "{rev}\n"
       
    60   > simple2 = {rev}\n
       
    61   > rev = "should not precede {rev} keyword\n"
       
    62   > EOF
       
    63 
       
    64   $ hg log -l1 -Tsimple
       
    65   8
       
    66   $ hg log -l1 -Tsimple2
       
    67   8
       
    68   $ hg log -l1 -Trev
       
    69   should not precede 8 keyword
       
    70   $ hg log -l1 -T '{simple}'
       
    71   8
       
    72 
       
    73 Map file shouldn't see user templates:
       
    74 
       
    75   $ cat <<EOF > tmpl
       
    76   > changeset = 'nothing expanded:{simple}\n'
       
    77   > EOF
       
    78   $ hg log -l1 --style ./tmpl
       
    79   nothing expanded:
       
    80 
       
    81 Test templates and style maps in files:
       
    82 
       
    83   $ echo "{rev}" > tmpl
       
    84   $ hg log -l1 -T./tmpl
       
    85   8
       
    86   $ hg log -l1 -Tblah/blah
       
    87   blah/blah (no-eol)
       
    88 
       
    89   $ printf 'changeset = "{rev}\\n"\n' > map-simple
       
    90   $ hg log -l1 -T./map-simple
       
    91   8
       
    92 
       
    93  a map file may have [templates] and [templatealias] sections:
       
    94 
       
    95   $ cat <<'EOF' > map-simple
       
    96   > [templates]
       
    97   > changeset = "{a}\n"
       
    98   > [templatealias]
       
    99   > a = rev
       
   100   > EOF
       
   101   $ hg log -l1 -T./map-simple
       
   102   8
       
   103 
       
   104  so it can be included in hgrc
       
   105 
       
   106   $ cat <<EOF > myhgrc
       
   107   > %include $HGRCPATH
       
   108   > %include map-simple
       
   109   > [templates]
       
   110   > foo = "{changeset}"
       
   111   > EOF
       
   112   $ HGRCPATH=./myhgrc hg log -l1 -Tfoo
       
   113   8
       
   114   $ HGRCPATH=./myhgrc hg log -l1 -T'{a}\n'
       
   115   8
       
   116 
       
   117 Test template map inheritance
       
   118 
       
   119   $ echo "__base__ = map-cmdline.default" > map-simple
       
   120   $ printf 'cset = "changeset: ***{rev}***\\n"\n' >> map-simple
       
   121   $ hg log -l1 -T./map-simple
       
   122   changeset: ***8***
       
   123   tag:         tip
       
   124   user:        test
       
   125   date:        Wed Jan 01 10:01:00 2020 +0000
       
   126   summary:     third
       
   127   
       
   128 
       
   129 Test docheader, docfooter and separator in template map
       
   130 
       
   131   $ cat <<'EOF' > map-myjson
       
   132   > docheader = '\{\n'
       
   133   > docfooter = '\n}\n'
       
   134   > separator = ',\n'
       
   135   > changeset = ' {dict(rev, node|short)|json}'
       
   136   > EOF
       
   137   $ hg log -l2 -T./map-myjson
       
   138   {
       
   139    {"node": "95c24699272e", "rev": 8},
       
   140    {"node": "29114dbae42b", "rev": 7}
       
   141   }
       
   142 
       
   143 Test docheader, docfooter and separator in [templates] section
       
   144 
       
   145   $ cat <<'EOF' >> .hg/hgrc
       
   146   > [templates]
       
   147   > myjson = ' {dict(rev, node|short)|json}'
       
   148   > myjson:docheader = '\{\n'
       
   149   > myjson:docfooter = '\n}\n'
       
   150   > myjson:separator = ',\n'
       
   151   > :docheader = 'should not be selected as a docheader for literal templates\n'
       
   152   > EOF
       
   153   $ hg log -l2 -Tmyjson
       
   154   {
       
   155    {"node": "95c24699272e", "rev": 8},
       
   156    {"node": "29114dbae42b", "rev": 7}
       
   157   }
       
   158   $ hg log -l1 -T'{rev}\n'
       
   159   8
       
   160 
       
   161 Template should precede style option
       
   162 
       
   163   $ hg log -l1 --style default -T '{rev}\n'
       
   164   8
       
   165 
       
   166 Add a commit with empty description, to ensure that the templates
       
   167 below will omit the description line.
       
   168 
       
   169   $ echo c >> c
       
   170   $ hg add c
       
   171   $ hg commit -qm ' '
       
   172 
       
   173 Default style is like normal output. Phases style should be the same
       
   174 as default style, except for extra phase lines.
       
   175 
       
   176   $ hg log > log.out
       
   177   $ hg log --style default > style.out
       
   178   $ cmp log.out style.out || diff -u log.out style.out
       
   179   $ hg log -T phases > phases.out
       
   180   $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@'
       
   181   +phase:       draft
       
   182   +phase:       draft
       
   183   +phase:       draft
       
   184   +phase:       draft
       
   185   +phase:       draft
       
   186   +phase:       draft
       
   187   +phase:       draft
       
   188   +phase:       draft
       
   189   +phase:       draft
       
   190   +phase:       draft
       
   191 
       
   192   $ hg log -v > log.out
       
   193   $ hg log -v --style default > style.out
       
   194   $ cmp log.out style.out || diff -u log.out style.out
       
   195   $ hg log -v -T phases > phases.out
       
   196   $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@'
       
   197   +phase:       draft
       
   198   +phase:       draft
       
   199   +phase:       draft
       
   200   +phase:       draft
       
   201   +phase:       draft
       
   202   +phase:       draft
       
   203   +phase:       draft
       
   204   +phase:       draft
       
   205   +phase:       draft
       
   206   +phase:       draft
       
   207 
       
   208   $ hg log -q > log.out
       
   209   $ hg log -q --style default > style.out
       
   210   $ cmp log.out style.out || diff -u log.out style.out
       
   211   $ hg log -q -T phases > phases.out
       
   212   $ cmp log.out phases.out || diff -u log.out phases.out
       
   213 
       
   214   $ hg log --debug > log.out
       
   215   $ hg log --debug --style default > style.out
       
   216   $ cmp log.out style.out || diff -u log.out style.out
       
   217   $ hg log --debug -T phases > phases.out
       
   218   $ cmp log.out phases.out || diff -u log.out phases.out
       
   219 
       
   220 Default style of working-directory revision should also be the same (but
       
   221 date may change while running tests):
       
   222 
       
   223   $ hg log -r 'wdir()' | sed 's|^date:.*|date:|' > log.out
       
   224   $ hg log -r 'wdir()' --style default | sed 's|^date:.*|date:|' > style.out
       
   225   $ cmp log.out style.out || diff -u log.out style.out
       
   226 
       
   227   $ hg log -r 'wdir()' -v | sed 's|^date:.*|date:|' > log.out
       
   228   $ hg log -r 'wdir()' -v --style default | sed 's|^date:.*|date:|' > style.out
       
   229   $ cmp log.out style.out || diff -u log.out style.out
       
   230 
       
   231   $ hg log -r 'wdir()' -q > log.out
       
   232   $ hg log -r 'wdir()' -q --style default > style.out
       
   233   $ cmp log.out style.out || diff -u log.out style.out
       
   234 
       
   235   $ hg log -r 'wdir()' --debug | sed 's|^date:.*|date:|' > log.out
       
   236   $ hg log -r 'wdir()' --debug --style default \
       
   237   > | sed 's|^date:.*|date:|' > style.out
       
   238   $ cmp log.out style.out || diff -u log.out style.out
       
   239 
       
   240 Default style should also preserve color information (issue2866):
       
   241 
       
   242   $ cp $HGRCPATH $HGRCPATH-bak
       
   243   $ cat <<EOF >> $HGRCPATH
       
   244   > [extensions]
       
   245   > color=
       
   246   > EOF
       
   247 
       
   248   $ hg --color=debug log > log.out
       
   249   $ hg --color=debug log --style default > style.out
       
   250   $ cmp log.out style.out || diff -u log.out style.out
       
   251   $ hg --color=debug log -T phases > phases.out
       
   252   $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@'
       
   253   +[log.phase|phase:       draft]
       
   254   +[log.phase|phase:       draft]
       
   255   +[log.phase|phase:       draft]
       
   256   +[log.phase|phase:       draft]
       
   257   +[log.phase|phase:       draft]
       
   258   +[log.phase|phase:       draft]
       
   259   +[log.phase|phase:       draft]
       
   260   +[log.phase|phase:       draft]
       
   261   +[log.phase|phase:       draft]
       
   262   +[log.phase|phase:       draft]
       
   263 
       
   264   $ hg --color=debug -v log > log.out
       
   265   $ hg --color=debug -v log --style default > style.out
       
   266   $ cmp log.out style.out || diff -u log.out style.out
       
   267   $ hg --color=debug -v log -T phases > phases.out
       
   268   $ diff -U 0 log.out phases.out | egrep -v '^---|^\+\+\+|^@@'
       
   269   +[log.phase|phase:       draft]
       
   270   +[log.phase|phase:       draft]
       
   271   +[log.phase|phase:       draft]
       
   272   +[log.phase|phase:       draft]
       
   273   +[log.phase|phase:       draft]
       
   274   +[log.phase|phase:       draft]
       
   275   +[log.phase|phase:       draft]
       
   276   +[log.phase|phase:       draft]
       
   277   +[log.phase|phase:       draft]
       
   278   +[log.phase|phase:       draft]
       
   279 
       
   280   $ hg --color=debug -q log > log.out
       
   281   $ hg --color=debug -q log --style default > style.out
       
   282   $ cmp log.out style.out || diff -u log.out style.out
       
   283   $ hg --color=debug -q log -T phases > phases.out
       
   284   $ cmp log.out phases.out || diff -u log.out phases.out
       
   285 
       
   286   $ hg --color=debug --debug log > log.out
       
   287   $ hg --color=debug --debug log --style default > style.out
       
   288   $ cmp log.out style.out || diff -u log.out style.out
       
   289   $ hg --color=debug --debug log -T phases > phases.out
       
   290   $ cmp log.out phases.out || diff -u log.out phases.out
       
   291 
       
   292   $ mv $HGRCPATH-bak $HGRCPATH
       
   293 
       
   294 Remove commit with empty commit message, so as to not pollute further
       
   295 tests.
       
   296 
       
   297   $ hg --config extensions.strip= strip -q .
       
   298 
       
   299 Revision with no copies (used to print a traceback):
       
   300 
       
   301   $ hg tip -v --template '\n'
       
   302   
       
   303 
       
   304 Compact style works:
       
   305 
       
   306   $ hg log -Tcompact
       
   307   8[tip]   95c24699272e   2020-01-01 10:01 +0000   test
       
   308     third
       
   309   
       
   310   7:-1   29114dbae42b   1970-01-12 13:46 +0000   user
       
   311     second
       
   312   
       
   313   6:5,4   d41e714fe50d   1970-01-18 08:40 +0000   person
       
   314     merge
       
   315   
       
   316   5:3   13207e5a10d9   1970-01-18 08:40 +0000   person
       
   317     new head
       
   318   
       
   319   4   bbe44766e73d   1970-01-17 04:53 +0000   person
       
   320     new branch
       
   321   
       
   322   3   10e46f2dcbf4   1970-01-16 01:06 +0000   person
       
   323     no user, no domain
       
   324   
       
   325   2   97054abb4ab8   1970-01-14 21:20 +0000   other
       
   326     no person
       
   327   
       
   328   1   b608e9d1a3f0   1970-01-13 17:33 +0000   other
       
   329     other 1
       
   330   
       
   331   0   1e4e1b8f71e0   1970-01-12 13:46 +0000   user
       
   332     line 1
       
   333   
       
   334 
       
   335   $ hg log -v --style compact
       
   336   8[tip]   95c24699272e   2020-01-01 10:01 +0000   test
       
   337     third
       
   338   
       
   339   7:-1   29114dbae42b   1970-01-12 13:46 +0000   User Name <user@hostname>
       
   340     second
       
   341   
       
   342   6:5,4   d41e714fe50d   1970-01-18 08:40 +0000   person
       
   343     merge
       
   344   
       
   345   5:3   13207e5a10d9   1970-01-18 08:40 +0000   person
       
   346     new head
       
   347   
       
   348   4   bbe44766e73d   1970-01-17 04:53 +0000   person
       
   349     new branch
       
   350   
       
   351   3   10e46f2dcbf4   1970-01-16 01:06 +0000   person
       
   352     no user, no domain
       
   353   
       
   354   2   97054abb4ab8   1970-01-14 21:20 +0000   other@place
       
   355     no person
       
   356   
       
   357   1   b608e9d1a3f0   1970-01-13 17:33 +0000   A. N. Other <other@place>
       
   358     other 1
       
   359   other 2
       
   360   
       
   361   other 3
       
   362   
       
   363   0   1e4e1b8f71e0   1970-01-12 13:46 +0000   User Name <user@hostname>
       
   364     line 1
       
   365   line 2
       
   366   
       
   367 
       
   368   $ hg log --debug --style compact
       
   369   8[tip]:7,-1   95c24699272e   2020-01-01 10:01 +0000   test
       
   370     third
       
   371   
       
   372   7:-1,-1   29114dbae42b   1970-01-12 13:46 +0000   User Name <user@hostname>
       
   373     second
       
   374   
       
   375   6:5,4   d41e714fe50d   1970-01-18 08:40 +0000   person
       
   376     merge
       
   377   
       
   378   5:3,-1   13207e5a10d9   1970-01-18 08:40 +0000   person
       
   379     new head
       
   380   
       
   381   4:3,-1   bbe44766e73d   1970-01-17 04:53 +0000   person
       
   382     new branch
       
   383   
       
   384   3:2,-1   10e46f2dcbf4   1970-01-16 01:06 +0000   person
       
   385     no user, no domain
       
   386   
       
   387   2:1,-1   97054abb4ab8   1970-01-14 21:20 +0000   other@place
       
   388     no person
       
   389   
       
   390   1:0,-1   b608e9d1a3f0   1970-01-13 17:33 +0000   A. N. Other <other@place>
       
   391     other 1
       
   392   other 2
       
   393   
       
   394   other 3
       
   395   
       
   396   0:-1,-1   1e4e1b8f71e0   1970-01-12 13:46 +0000   User Name <user@hostname>
       
   397     line 1
       
   398   line 2
       
   399   
       
   400 
       
   401 Test xml styles:
       
   402 
       
   403   $ hg log --style xml -r 'not all()'
       
   404   <?xml version="1.0"?>
       
   405   <log>
       
   406   </log>
       
   407 
       
   408   $ hg log --style xml
       
   409   <?xml version="1.0"?>
       
   410   <log>
       
   411   <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
       
   412   <tag>tip</tag>
       
   413   <author email="test">test</author>
       
   414   <date>2020-01-01T10:01:00+00:00</date>
       
   415   <msg xml:space="preserve">third</msg>
       
   416   </logentry>
       
   417   <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
       
   418   <parent revision="-1" node="0000000000000000000000000000000000000000" />
       
   419   <author email="user@hostname">User Name</author>
       
   420   <date>1970-01-12T13:46:40+00:00</date>
       
   421   <msg xml:space="preserve">second</msg>
       
   422   </logentry>
       
   423   <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
       
   424   <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
       
   425   <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
       
   426   <author email="person">person</author>
       
   427   <date>1970-01-18T08:40:01+00:00</date>
       
   428   <msg xml:space="preserve">merge</msg>
       
   429   </logentry>
       
   430   <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
       
   431   <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
       
   432   <author email="person">person</author>
       
   433   <date>1970-01-18T08:40:00+00:00</date>
       
   434   <msg xml:space="preserve">new head</msg>
       
   435   </logentry>
       
   436   <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
       
   437   <branch>foo</branch>
       
   438   <author email="person">person</author>
       
   439   <date>1970-01-17T04:53:20+00:00</date>
       
   440   <msg xml:space="preserve">new branch</msg>
       
   441   </logentry>
       
   442   <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
       
   443   <author email="person">person</author>
       
   444   <date>1970-01-16T01:06:40+00:00</date>
       
   445   <msg xml:space="preserve">no user, no domain</msg>
       
   446   </logentry>
       
   447   <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
       
   448   <author email="other@place">other</author>
       
   449   <date>1970-01-14T21:20:00+00:00</date>
       
   450   <msg xml:space="preserve">no person</msg>
       
   451   </logentry>
       
   452   <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
       
   453   <author email="other@place">A. N. Other</author>
       
   454   <date>1970-01-13T17:33:20+00:00</date>
       
   455   <msg xml:space="preserve">other 1
       
   456   other 2
       
   457   
       
   458   other 3</msg>
       
   459   </logentry>
       
   460   <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
       
   461   <author email="user@hostname">User Name</author>
       
   462   <date>1970-01-12T13:46:40+00:00</date>
       
   463   <msg xml:space="preserve">line 1
       
   464   line 2</msg>
       
   465   </logentry>
       
   466   </log>
       
   467 
       
   468   $ hg log -v --style xml
       
   469   <?xml version="1.0"?>
       
   470   <log>
       
   471   <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
       
   472   <tag>tip</tag>
       
   473   <author email="test">test</author>
       
   474   <date>2020-01-01T10:01:00+00:00</date>
       
   475   <msg xml:space="preserve">third</msg>
       
   476   <paths>
       
   477   <path action="A">fourth</path>
       
   478   <path action="A">third</path>
       
   479   <path action="R">second</path>
       
   480   </paths>
       
   481   <copies>
       
   482   <copy source="second">fourth</copy>
       
   483   </copies>
       
   484   </logentry>
       
   485   <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
       
   486   <parent revision="-1" node="0000000000000000000000000000000000000000" />
       
   487   <author email="user@hostname">User Name</author>
       
   488   <date>1970-01-12T13:46:40+00:00</date>
       
   489   <msg xml:space="preserve">second</msg>
       
   490   <paths>
       
   491   <path action="A">second</path>
       
   492   </paths>
       
   493   </logentry>
       
   494   <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
       
   495   <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
       
   496   <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
       
   497   <author email="person">person</author>
       
   498   <date>1970-01-18T08:40:01+00:00</date>
       
   499   <msg xml:space="preserve">merge</msg>
       
   500   <paths>
       
   501   </paths>
       
   502   </logentry>
       
   503   <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
       
   504   <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
       
   505   <author email="person">person</author>
       
   506   <date>1970-01-18T08:40:00+00:00</date>
       
   507   <msg xml:space="preserve">new head</msg>
       
   508   <paths>
       
   509   <path action="A">d</path>
       
   510   </paths>
       
   511   </logentry>
       
   512   <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
       
   513   <branch>foo</branch>
       
   514   <author email="person">person</author>
       
   515   <date>1970-01-17T04:53:20+00:00</date>
       
   516   <msg xml:space="preserve">new branch</msg>
       
   517   <paths>
       
   518   </paths>
       
   519   </logentry>
       
   520   <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
       
   521   <author email="person">person</author>
       
   522   <date>1970-01-16T01:06:40+00:00</date>
       
   523   <msg xml:space="preserve">no user, no domain</msg>
       
   524   <paths>
       
   525   <path action="M">c</path>
       
   526   </paths>
       
   527   </logentry>
       
   528   <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
       
   529   <author email="other@place">other</author>
       
   530   <date>1970-01-14T21:20:00+00:00</date>
       
   531   <msg xml:space="preserve">no person</msg>
       
   532   <paths>
       
   533   <path action="A">c</path>
       
   534   </paths>
       
   535   </logentry>
       
   536   <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
       
   537   <author email="other@place">A. N. Other</author>
       
   538   <date>1970-01-13T17:33:20+00:00</date>
       
   539   <msg xml:space="preserve">other 1
       
   540   other 2
       
   541   
       
   542   other 3</msg>
       
   543   <paths>
       
   544   <path action="A">b</path>
       
   545   </paths>
       
   546   </logentry>
       
   547   <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
       
   548   <author email="user@hostname">User Name</author>
       
   549   <date>1970-01-12T13:46:40+00:00</date>
       
   550   <msg xml:space="preserve">line 1
       
   551   line 2</msg>
       
   552   <paths>
       
   553   <path action="A">a</path>
       
   554   </paths>
       
   555   </logentry>
       
   556   </log>
       
   557 
       
   558   $ hg log --debug --style xml
       
   559   <?xml version="1.0"?>
       
   560   <log>
       
   561   <logentry revision="8" node="95c24699272ef57d062b8bccc32c878bf841784a">
       
   562   <tag>tip</tag>
       
   563   <parent revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453" />
       
   564   <parent revision="-1" node="0000000000000000000000000000000000000000" />
       
   565   <author email="test">test</author>
       
   566   <date>2020-01-01T10:01:00+00:00</date>
       
   567   <msg xml:space="preserve">third</msg>
       
   568   <paths>
       
   569   <path action="A">fourth</path>
       
   570   <path action="A">third</path>
       
   571   <path action="R">second</path>
       
   572   </paths>
       
   573   <copies>
       
   574   <copy source="second">fourth</copy>
       
   575   </copies>
       
   576   <extra key="branch">default</extra>
       
   577   </logentry>
       
   578   <logentry revision="7" node="29114dbae42b9f078cf2714dbe3a86bba8ec7453">
       
   579   <parent revision="-1" node="0000000000000000000000000000000000000000" />
       
   580   <parent revision="-1" node="0000000000000000000000000000000000000000" />
       
   581   <author email="user@hostname">User Name</author>
       
   582   <date>1970-01-12T13:46:40+00:00</date>
       
   583   <msg xml:space="preserve">second</msg>
       
   584   <paths>
       
   585   <path action="A">second</path>
       
   586   </paths>
       
   587   <extra key="branch">default</extra>
       
   588   </logentry>
       
   589   <logentry revision="6" node="d41e714fe50d9e4a5f11b4d595d543481b5f980b">
       
   590   <parent revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f" />
       
   591   <parent revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74" />
       
   592   <author email="person">person</author>
       
   593   <date>1970-01-18T08:40:01+00:00</date>
       
   594   <msg xml:space="preserve">merge</msg>
       
   595   <paths>
       
   596   </paths>
       
   597   <extra key="branch">default</extra>
       
   598   </logentry>
       
   599   <logentry revision="5" node="13207e5a10d9fd28ec424934298e176197f2c67f">
       
   600   <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
       
   601   <parent revision="-1" node="0000000000000000000000000000000000000000" />
       
   602   <author email="person">person</author>
       
   603   <date>1970-01-18T08:40:00+00:00</date>
       
   604   <msg xml:space="preserve">new head</msg>
       
   605   <paths>
       
   606   <path action="A">d</path>
       
   607   </paths>
       
   608   <extra key="branch">default</extra>
       
   609   </logentry>
       
   610   <logentry revision="4" node="bbe44766e73d5f11ed2177f1838de10c53ef3e74">
       
   611   <branch>foo</branch>
       
   612   <parent revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47" />
       
   613   <parent revision="-1" node="0000000000000000000000000000000000000000" />
       
   614   <author email="person">person</author>
       
   615   <date>1970-01-17T04:53:20+00:00</date>
       
   616   <msg xml:space="preserve">new branch</msg>
       
   617   <paths>
       
   618   </paths>
       
   619   <extra key="branch">foo</extra>
       
   620   </logentry>
       
   621   <logentry revision="3" node="10e46f2dcbf4823578cf180f33ecf0b957964c47">
       
   622   <parent revision="2" node="97054abb4ab824450e9164180baf491ae0078465" />
       
   623   <parent revision="-1" node="0000000000000000000000000000000000000000" />
       
   624   <author email="person">person</author>
       
   625   <date>1970-01-16T01:06:40+00:00</date>
       
   626   <msg xml:space="preserve">no user, no domain</msg>
       
   627   <paths>
       
   628   <path action="M">c</path>
       
   629   </paths>
       
   630   <extra key="branch">default</extra>
       
   631   </logentry>
       
   632   <logentry revision="2" node="97054abb4ab824450e9164180baf491ae0078465">
       
   633   <parent revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965" />
       
   634   <parent revision="-1" node="0000000000000000000000000000000000000000" />
       
   635   <author email="other@place">other</author>
       
   636   <date>1970-01-14T21:20:00+00:00</date>
       
   637   <msg xml:space="preserve">no person</msg>
       
   638   <paths>
       
   639   <path action="A">c</path>
       
   640   </paths>
       
   641   <extra key="branch">default</extra>
       
   642   </logentry>
       
   643   <logentry revision="1" node="b608e9d1a3f0273ccf70fb85fd6866b3482bf965">
       
   644   <parent revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f" />
       
   645   <parent revision="-1" node="0000000000000000000000000000000000000000" />
       
   646   <author email="other@place">A. N. Other</author>
       
   647   <date>1970-01-13T17:33:20+00:00</date>
       
   648   <msg xml:space="preserve">other 1
       
   649   other 2
       
   650   
       
   651   other 3</msg>
       
   652   <paths>
       
   653   <path action="A">b</path>
       
   654   </paths>
       
   655   <extra key="branch">default</extra>
       
   656   </logentry>
       
   657   <logentry revision="0" node="1e4e1b8f71e05681d422154f5421e385fec3454f">
       
   658   <parent revision="-1" node="0000000000000000000000000000000000000000" />
       
   659   <parent revision="-1" node="0000000000000000000000000000000000000000" />
       
   660   <author email="user@hostname">User Name</author>
       
   661   <date>1970-01-12T13:46:40+00:00</date>
       
   662   <msg xml:space="preserve">line 1
       
   663   line 2</msg>
       
   664   <paths>
       
   665   <path action="A">a</path>
       
   666   </paths>
       
   667   <extra key="branch">default</extra>
       
   668   </logentry>
       
   669   </log>
       
   670 
       
   671 
       
   672 Test JSON style:
       
   673 
       
   674   $ hg log -k nosuch -Tjson
       
   675   [
       
   676   ]
       
   677 
       
   678   $ hg log -qr . -Tjson
       
   679   [
       
   680    {
       
   681     "node": "95c24699272ef57d062b8bccc32c878bf841784a",
       
   682     "rev": 8
       
   683    }
       
   684   ]
       
   685 
       
   686   $ hg log -vpr . -Tjson --stat
       
   687   [
       
   688    {
       
   689     "bookmarks": [],
       
   690     "branch": "default",
       
   691     "date": [1577872860, 0],
       
   692     "desc": "third",
       
   693     "diff": "diff -r 29114dbae42b -r 95c24699272e fourth\n--- /dev/null\tThu Jan 01 00:00:00 1970 +0000\n+++ b/fourth\tWed Jan 01 10:01:00 2020 +0000\n@@ -0,0 +1,1 @@\n+second\ndiff -r 29114dbae42b -r 95c24699272e second\n--- a/second\tMon Jan 12 13:46:40 1970 +0000\n+++ /dev/null\tThu Jan 01 00:00:00 1970 +0000\n@@ -1,1 +0,0 @@\n-second\ndiff -r 29114dbae42b -r 95c24699272e third\n--- /dev/null\tThu Jan 01 00:00:00 1970 +0000\n+++ b/third\tWed Jan 01 10:01:00 2020 +0000\n@@ -0,0 +1,1 @@\n+third\n",
       
   694     "diffstat": " fourth |  1 +\n second |  1 -\n third  |  1 +\n 3 files changed, 2 insertions(+), 1 deletions(-)\n",
       
   695     "files": ["fourth", "second", "third"],
       
   696     "node": "95c24699272ef57d062b8bccc32c878bf841784a",
       
   697     "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
       
   698     "phase": "draft",
       
   699     "rev": 8,
       
   700     "tags": ["tip"],
       
   701     "user": "test"
       
   702    }
       
   703   ]
       
   704 
       
   705 honor --git but not format-breaking diffopts
       
   706   $ hg --config diff.noprefix=True log --git -vpr . -Tjson
       
   707   [
       
   708    {
       
   709     "bookmarks": [],
       
   710     "branch": "default",
       
   711     "date": [1577872860, 0],
       
   712     "desc": "third",
       
   713     "diff": "diff --git a/second b/fourth\nrename from second\nrename to fourth\ndiff --git a/third b/third\nnew file mode 100644\n--- /dev/null\n+++ b/third\n@@ -0,0 +1,1 @@\n+third\n",
       
   714     "files": ["fourth", "second", "third"],
       
   715     "node": "95c24699272ef57d062b8bccc32c878bf841784a",
       
   716     "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
       
   717     "phase": "draft",
       
   718     "rev": 8,
       
   719     "tags": ["tip"],
       
   720     "user": "test"
       
   721    }
       
   722   ]
       
   723 
       
   724   $ hg log -T json
       
   725   [
       
   726    {
       
   727     "bookmarks": [],
       
   728     "branch": "default",
       
   729     "date": [1577872860, 0],
       
   730     "desc": "third",
       
   731     "node": "95c24699272ef57d062b8bccc32c878bf841784a",
       
   732     "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
       
   733     "phase": "draft",
       
   734     "rev": 8,
       
   735     "tags": ["tip"],
       
   736     "user": "test"
       
   737    },
       
   738    {
       
   739     "bookmarks": [],
       
   740     "branch": "default",
       
   741     "date": [1000000, 0],
       
   742     "desc": "second",
       
   743     "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453",
       
   744     "parents": ["0000000000000000000000000000000000000000"],
       
   745     "phase": "draft",
       
   746     "rev": 7,
       
   747     "tags": [],
       
   748     "user": "User Name <user@hostname>"
       
   749    },
       
   750    {
       
   751     "bookmarks": [],
       
   752     "branch": "default",
       
   753     "date": [1500001, 0],
       
   754     "desc": "merge",
       
   755     "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b",
       
   756     "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"],
       
   757     "phase": "draft",
       
   758     "rev": 6,
       
   759     "tags": [],
       
   760     "user": "person"
       
   761    },
       
   762    {
       
   763     "bookmarks": [],
       
   764     "branch": "default",
       
   765     "date": [1500000, 0],
       
   766     "desc": "new head",
       
   767     "node": "13207e5a10d9fd28ec424934298e176197f2c67f",
       
   768     "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
       
   769     "phase": "draft",
       
   770     "rev": 5,
       
   771     "tags": [],
       
   772     "user": "person"
       
   773    },
       
   774    {
       
   775     "bookmarks": [],
       
   776     "branch": "foo",
       
   777     "date": [1400000, 0],
       
   778     "desc": "new branch",
       
   779     "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74",
       
   780     "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
       
   781     "phase": "draft",
       
   782     "rev": 4,
       
   783     "tags": [],
       
   784     "user": "person"
       
   785    },
       
   786    {
       
   787     "bookmarks": [],
       
   788     "branch": "default",
       
   789     "date": [1300000, 0],
       
   790     "desc": "no user, no domain",
       
   791     "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47",
       
   792     "parents": ["97054abb4ab824450e9164180baf491ae0078465"],
       
   793     "phase": "draft",
       
   794     "rev": 3,
       
   795     "tags": [],
       
   796     "user": "person"
       
   797    },
       
   798    {
       
   799     "bookmarks": [],
       
   800     "branch": "default",
       
   801     "date": [1200000, 0],
       
   802     "desc": "no person",
       
   803     "node": "97054abb4ab824450e9164180baf491ae0078465",
       
   804     "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"],
       
   805     "phase": "draft",
       
   806     "rev": 2,
       
   807     "tags": [],
       
   808     "user": "other@place"
       
   809    },
       
   810    {
       
   811     "bookmarks": [],
       
   812     "branch": "default",
       
   813     "date": [1100000, 0],
       
   814     "desc": "other 1\nother 2\n\nother 3",
       
   815     "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965",
       
   816     "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"],
       
   817     "phase": "draft",
       
   818     "rev": 1,
       
   819     "tags": [],
       
   820     "user": "A. N. Other <other@place>"
       
   821    },
       
   822    {
       
   823     "bookmarks": [],
       
   824     "branch": "default",
       
   825     "date": [1000000, 0],
       
   826     "desc": "line 1\nline 2",
       
   827     "node": "1e4e1b8f71e05681d422154f5421e385fec3454f",
       
   828     "parents": ["0000000000000000000000000000000000000000"],
       
   829     "phase": "draft",
       
   830     "rev": 0,
       
   831     "tags": [],
       
   832     "user": "User Name <user@hostname>"
       
   833    }
       
   834   ]
       
   835 
       
   836   $ hg heads -v -Tjson
       
   837   [
       
   838    {
       
   839     "bookmarks": [],
       
   840     "branch": "default",
       
   841     "date": [1577872860, 0],
       
   842     "desc": "third",
       
   843     "files": ["fourth", "second", "third"],
       
   844     "node": "95c24699272ef57d062b8bccc32c878bf841784a",
       
   845     "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
       
   846     "phase": "draft",
       
   847     "rev": 8,
       
   848     "tags": ["tip"],
       
   849     "user": "test"
       
   850    },
       
   851    {
       
   852     "bookmarks": [],
       
   853     "branch": "default",
       
   854     "date": [1500001, 0],
       
   855     "desc": "merge",
       
   856     "files": [],
       
   857     "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b",
       
   858     "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"],
       
   859     "phase": "draft",
       
   860     "rev": 6,
       
   861     "tags": [],
       
   862     "user": "person"
       
   863    },
       
   864    {
       
   865     "bookmarks": [],
       
   866     "branch": "foo",
       
   867     "date": [1400000, 0],
       
   868     "desc": "new branch",
       
   869     "files": [],
       
   870     "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74",
       
   871     "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
       
   872     "phase": "draft",
       
   873     "rev": 4,
       
   874     "tags": [],
       
   875     "user": "person"
       
   876    }
       
   877   ]
       
   878 
       
   879   $ hg log --debug -Tjson
       
   880   [
       
   881    {
       
   882     "added": ["fourth", "third"],
       
   883     "bookmarks": [],
       
   884     "branch": "default",
       
   885     "date": [1577872860, 0],
       
   886     "desc": "third",
       
   887     "extra": {"branch": "default"},
       
   888     "manifest": "94961b75a2da554b4df6fb599e5bfc7d48de0c64",
       
   889     "modified": [],
       
   890     "node": "95c24699272ef57d062b8bccc32c878bf841784a",
       
   891     "parents": ["29114dbae42b9f078cf2714dbe3a86bba8ec7453"],
       
   892     "phase": "draft",
       
   893     "removed": ["second"],
       
   894     "rev": 8,
       
   895     "tags": ["tip"],
       
   896     "user": "test"
       
   897    },
       
   898    {
       
   899     "added": ["second"],
       
   900     "bookmarks": [],
       
   901     "branch": "default",
       
   902     "date": [1000000, 0],
       
   903     "desc": "second",
       
   904     "extra": {"branch": "default"},
       
   905     "manifest": "f2dbc354b94e5ec0b4f10680ee0cee816101d0bf",
       
   906     "modified": [],
       
   907     "node": "29114dbae42b9f078cf2714dbe3a86bba8ec7453",
       
   908     "parents": ["0000000000000000000000000000000000000000"],
       
   909     "phase": "draft",
       
   910     "removed": [],
       
   911     "rev": 7,
       
   912     "tags": [],
       
   913     "user": "User Name <user@hostname>"
       
   914    },
       
   915    {
       
   916     "added": [],
       
   917     "bookmarks": [],
       
   918     "branch": "default",
       
   919     "date": [1500001, 0],
       
   920     "desc": "merge",
       
   921     "extra": {"branch": "default"},
       
   922     "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216",
       
   923     "modified": [],
       
   924     "node": "d41e714fe50d9e4a5f11b4d595d543481b5f980b",
       
   925     "parents": ["13207e5a10d9fd28ec424934298e176197f2c67f", "bbe44766e73d5f11ed2177f1838de10c53ef3e74"],
       
   926     "phase": "draft",
       
   927     "removed": [],
       
   928     "rev": 6,
       
   929     "tags": [],
       
   930     "user": "person"
       
   931    },
       
   932    {
       
   933     "added": ["d"],
       
   934     "bookmarks": [],
       
   935     "branch": "default",
       
   936     "date": [1500000, 0],
       
   937     "desc": "new head",
       
   938     "extra": {"branch": "default"},
       
   939     "manifest": "4dc3def4f9b4c6e8de820f6ee74737f91e96a216",
       
   940     "modified": [],
       
   941     "node": "13207e5a10d9fd28ec424934298e176197f2c67f",
       
   942     "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
       
   943     "phase": "draft",
       
   944     "removed": [],
       
   945     "rev": 5,
       
   946     "tags": [],
       
   947     "user": "person"
       
   948    },
       
   949    {
       
   950     "added": [],
       
   951     "bookmarks": [],
       
   952     "branch": "foo",
       
   953     "date": [1400000, 0],
       
   954     "desc": "new branch",
       
   955     "extra": {"branch": "foo"},
       
   956     "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc",
       
   957     "modified": [],
       
   958     "node": "bbe44766e73d5f11ed2177f1838de10c53ef3e74",
       
   959     "parents": ["10e46f2dcbf4823578cf180f33ecf0b957964c47"],
       
   960     "phase": "draft",
       
   961     "removed": [],
       
   962     "rev": 4,
       
   963     "tags": [],
       
   964     "user": "person"
       
   965    },
       
   966    {
       
   967     "added": [],
       
   968     "bookmarks": [],
       
   969     "branch": "default",
       
   970     "date": [1300000, 0],
       
   971     "desc": "no user, no domain",
       
   972     "extra": {"branch": "default"},
       
   973     "manifest": "cb5a1327723bada42f117e4c55a303246eaf9ccc",
       
   974     "modified": ["c"],
       
   975     "node": "10e46f2dcbf4823578cf180f33ecf0b957964c47",
       
   976     "parents": ["97054abb4ab824450e9164180baf491ae0078465"],
       
   977     "phase": "draft",
       
   978     "removed": [],
       
   979     "rev": 3,
       
   980     "tags": [],
       
   981     "user": "person"
       
   982    },
       
   983    {
       
   984     "added": ["c"],
       
   985     "bookmarks": [],
       
   986     "branch": "default",
       
   987     "date": [1200000, 0],
       
   988     "desc": "no person",
       
   989     "extra": {"branch": "default"},
       
   990     "manifest": "6e0e82995c35d0d57a52aca8da4e56139e06b4b1",
       
   991     "modified": [],
       
   992     "node": "97054abb4ab824450e9164180baf491ae0078465",
       
   993     "parents": ["b608e9d1a3f0273ccf70fb85fd6866b3482bf965"],
       
   994     "phase": "draft",
       
   995     "removed": [],
       
   996     "rev": 2,
       
   997     "tags": [],
       
   998     "user": "other@place"
       
   999    },
       
  1000    {
       
  1001     "added": ["b"],
       
  1002     "bookmarks": [],
       
  1003     "branch": "default",
       
  1004     "date": [1100000, 0],
       
  1005     "desc": "other 1\nother 2\n\nother 3",
       
  1006     "extra": {"branch": "default"},
       
  1007     "manifest": "4e8d705b1e53e3f9375e0e60dc7b525d8211fe55",
       
  1008     "modified": [],
       
  1009     "node": "b608e9d1a3f0273ccf70fb85fd6866b3482bf965",
       
  1010     "parents": ["1e4e1b8f71e05681d422154f5421e385fec3454f"],
       
  1011     "phase": "draft",
       
  1012     "removed": [],
       
  1013     "rev": 1,
       
  1014     "tags": [],
       
  1015     "user": "A. N. Other <other@place>"
       
  1016    },
       
  1017    {
       
  1018     "added": ["a"],
       
  1019     "bookmarks": [],
       
  1020     "branch": "default",
       
  1021     "date": [1000000, 0],
       
  1022     "desc": "line 1\nline 2",
       
  1023     "extra": {"branch": "default"},
       
  1024     "manifest": "a0c8bcbbb45c63b90b70ad007bf38961f64f2af0",
       
  1025     "modified": [],
       
  1026     "node": "1e4e1b8f71e05681d422154f5421e385fec3454f",
       
  1027     "parents": ["0000000000000000000000000000000000000000"],
       
  1028     "phase": "draft",
       
  1029     "removed": [],
       
  1030     "rev": 0,
       
  1031     "tags": [],
       
  1032     "user": "User Name <user@hostname>"
       
  1033    }
       
  1034   ]
       
  1035 
       
  1036 Error if style not readable:
       
  1037 
       
  1038 #if unix-permissions no-root
       
  1039   $ touch q
       
  1040   $ chmod 0 q
       
  1041   $ hg log --style ./q
       
  1042   abort: Permission denied: ./q
       
  1043   [255]
       
  1044 #endif
       
  1045 
       
  1046 Error if no style:
       
  1047 
       
  1048   $ hg log --style notexist
       
  1049   abort: style 'notexist' not found
       
  1050   (available styles: bisect, changelog, compact, default, phases, show, status, xml)
       
  1051   [255]
       
  1052 
       
  1053   $ hg log -T list
       
  1054   available styles: bisect, changelog, compact, default, phases, show, status, xml
       
  1055   abort: specify a template
       
  1056   [255]
       
  1057 
       
  1058 Error if style missing key:
       
  1059 
       
  1060   $ echo 'q = q' > t
       
  1061   $ hg log --style ./t
       
  1062   abort: "changeset" not in template map
       
  1063   [255]
       
  1064 
       
  1065 Error if style missing value:
       
  1066 
       
  1067   $ echo 'changeset =' > t
       
  1068   $ hg log --style t
       
  1069   hg: parse error at t:1: missing value
       
  1070   [255]
       
  1071 
       
  1072 Error if include fails:
       
  1073 
       
  1074   $ echo 'changeset = q' >> t
       
  1075 #if unix-permissions no-root
       
  1076   $ hg log --style ./t
       
  1077   abort: template file ./q: Permission denied
       
  1078   [255]
       
  1079   $ rm -f q
       
  1080 #endif
       
  1081 
       
  1082 Include works:
       
  1083 
       
  1084   $ echo '{rev}' > q
       
  1085   $ hg log --style ./t
       
  1086   8
       
  1087   7
       
  1088   6
       
  1089   5
       
  1090   4
       
  1091   3
       
  1092   2
       
  1093   1
       
  1094   0
       
  1095 
       
  1096   $ hg phase -r 5 --public
       
  1097   $ hg phase -r 7 --secret --force
       
  1098 
       
  1099 Missing non-standard names give no error (backward compatibility):
       
  1100 
       
  1101   $ echo "changeset = '{c}'" > t
       
  1102   $ hg log --style ./t
       
  1103 
       
  1104 Defining non-standard name works:
       
  1105 
       
  1106   $ cat <<EOF > t
       
  1107   > changeset = '{c}'
       
  1108   > c = q
       
  1109   > EOF
       
  1110   $ hg log --style ./t
       
  1111   8
       
  1112   7
       
  1113   6
       
  1114   5
       
  1115   4
       
  1116   3
       
  1117   2
       
  1118   1
       
  1119   0
       
  1120 
       
  1121 ui.style works:
       
  1122 
       
  1123   $ echo '[ui]' > .hg/hgrc
       
  1124   $ echo 'style = t' >> .hg/hgrc
       
  1125   $ hg log
       
  1126   8
       
  1127   7
       
  1128   6
       
  1129   5
       
  1130   4
       
  1131   3
       
  1132   2
       
  1133   1
       
  1134   0
       
  1135 
       
  1136 Issue338:
       
  1137 
       
  1138   $ hg log --style=changelog > changelog
       
  1139 
       
  1140   $ cat changelog
       
  1141   2020-01-01  test  <test>
       
  1142   
       
  1143   	* fourth, second, third:
       
  1144   	third
       
  1145   	[95c24699272e] [tip]
       
  1146   
       
  1147   1970-01-12  User Name  <user@hostname>
       
  1148   
       
  1149   	* second:
       
  1150   	second
       
  1151   	[29114dbae42b]
       
  1152   
       
  1153   1970-01-18  person  <person>
       
  1154   
       
  1155   	* merge
       
  1156   	[d41e714fe50d]
       
  1157   
       
  1158   	* d:
       
  1159   	new head
       
  1160   	[13207e5a10d9]
       
  1161   
       
  1162   1970-01-17  person  <person>
       
  1163   
       
  1164   	* new branch
       
  1165   	[bbe44766e73d] <foo>
       
  1166   
       
  1167   1970-01-16  person  <person>
       
  1168   
       
  1169   	* c:
       
  1170   	no user, no domain
       
  1171   	[10e46f2dcbf4]
       
  1172   
       
  1173   1970-01-14  other  <other@place>
       
  1174   
       
  1175   	* c:
       
  1176   	no person
       
  1177   	[97054abb4ab8]
       
  1178   
       
  1179   1970-01-13  A. N. Other  <other@place>
       
  1180   
       
  1181   	* b:
       
  1182   	other 1 other 2
       
  1183   
       
  1184   	other 3
       
  1185   	[b608e9d1a3f0]
       
  1186   
       
  1187   1970-01-12  User Name  <user@hostname>
       
  1188   
       
  1189   	* a:
       
  1190   	line 1 line 2
       
  1191   	[1e4e1b8f71e0]
       
  1192   
       
  1193 
       
  1194 Issue2130: xml output for 'hg heads' is malformed
       
  1195 
       
  1196   $ hg heads --style changelog
       
  1197   2020-01-01  test  <test>
       
  1198   
       
  1199   	* fourth, second, third:
       
  1200   	third
       
  1201   	[95c24699272e] [tip]
       
  1202   
       
  1203   1970-01-18  person  <person>
       
  1204   
       
  1205   	* merge
       
  1206   	[d41e714fe50d]
       
  1207   
       
  1208   1970-01-17  person  <person>
       
  1209   
       
  1210   	* new branch
       
  1211   	[bbe44766e73d] <foo>
       
  1212   
       
  1213 
       
  1214 Add a dummy commit to make up for the instability of the above:
       
  1215 
       
  1216   $ echo a > a
       
  1217   $ hg add a
       
  1218   $ hg ci -m future
       
  1219 
       
  1220 Add a commit that does all possible modifications at once
       
  1221 
       
  1222   $ echo modify >> third
       
  1223   $ touch b
       
  1224   $ hg add b
       
  1225   $ hg mv fourth fifth
       
  1226   $ hg rm a
       
  1227   $ hg ci -m "Modify, add, remove, rename"
       
  1228 
       
  1229 Check the status template
       
  1230 
       
  1231   $ cat <<EOF >> $HGRCPATH
       
  1232   > [extensions]
       
  1233   > color=
       
  1234   > EOF
       
  1235 
       
  1236   $ hg log -T status -r 10
       
  1237   changeset:   10:0f9759ec227a
       
  1238   tag:         tip
       
  1239   user:        test
       
  1240   date:        Thu Jan 01 00:00:00 1970 +0000
       
  1241   summary:     Modify, add, remove, rename
       
  1242   files:
       
  1243   M third
       
  1244   A b
       
  1245   A fifth
       
  1246   R a
       
  1247   R fourth
       
  1248   
       
  1249   $ hg log -T status -C -r 10
       
  1250   changeset:   10:0f9759ec227a
       
  1251   tag:         tip
       
  1252   user:        test
       
  1253   date:        Thu Jan 01 00:00:00 1970 +0000
       
  1254   summary:     Modify, add, remove, rename
       
  1255   files:
       
  1256   M third
       
  1257   A b
       
  1258   A fifth
       
  1259     fourth
       
  1260   R a
       
  1261   R fourth
       
  1262   
       
  1263   $ hg log -T status -C -r 10 -v
       
  1264   changeset:   10:0f9759ec227a
       
  1265   tag:         tip
       
  1266   user:        test
       
  1267   date:        Thu Jan 01 00:00:00 1970 +0000
       
  1268   description:
       
  1269   Modify, add, remove, rename
       
  1270   
       
  1271   files:
       
  1272   M third
       
  1273   A b
       
  1274   A fifth
       
  1275     fourth
       
  1276   R a
       
  1277   R fourth
       
  1278   
       
  1279   $ hg log -T status -C -r 10 --debug
       
  1280   changeset:   10:0f9759ec227a4859c2014a345cd8a859022b7c6c
       
  1281   tag:         tip
       
  1282   phase:       secret
       
  1283   parent:      9:bf9dfba36635106d6a73ccc01e28b762da60e066
       
  1284   parent:      -1:0000000000000000000000000000000000000000
       
  1285   manifest:    8:89dd546f2de0a9d6d664f58d86097eb97baba567
       
  1286   user:        test
       
  1287   date:        Thu Jan 01 00:00:00 1970 +0000
       
  1288   extra:       branch=default
       
  1289   description:
       
  1290   Modify, add, remove, rename
       
  1291   
       
  1292   files:
       
  1293   M third
       
  1294   A b
       
  1295   A fifth
       
  1296     fourth
       
  1297   R a
       
  1298   R fourth
       
  1299   
       
  1300   $ hg log -T status -C -r 10 --quiet
       
  1301   10:0f9759ec227a
       
  1302   $ hg --color=debug log -T status -r 10
       
  1303   [log.changeset changeset.secret|changeset:   10:0f9759ec227a]
       
  1304   [log.tag|tag:         tip]
       
  1305   [log.user|user:        test]
       
  1306   [log.date|date:        Thu Jan 01 00:00:00 1970 +0000]
       
  1307   [log.summary|summary:     Modify, add, remove, rename]
       
  1308   [ui.note log.files|files:]
       
  1309   [status.modified|M third]
       
  1310   [status.added|A b]
       
  1311   [status.added|A fifth]
       
  1312   [status.removed|R a]
       
  1313   [status.removed|R fourth]
       
  1314   
       
  1315   $ hg --color=debug log -T status -C -r 10
       
  1316   [log.changeset changeset.secret|changeset:   10:0f9759ec227a]
       
  1317   [log.tag|tag:         tip]
       
  1318   [log.user|user:        test]
       
  1319   [log.date|date:        Thu Jan 01 00:00:00 1970 +0000]
       
  1320   [log.summary|summary:     Modify, add, remove, rename]
       
  1321   [ui.note log.files|files:]
       
  1322   [status.modified|M third]
       
  1323   [status.added|A b]
       
  1324   [status.added|A fifth]
       
  1325   [status.copied|  fourth]
       
  1326   [status.removed|R a]
       
  1327   [status.removed|R fourth]
       
  1328   
       
  1329   $ hg --color=debug log -T status -C -r 10 -v
       
  1330   [log.changeset changeset.secret|changeset:   10:0f9759ec227a]
       
  1331   [log.tag|tag:         tip]
       
  1332   [log.user|user:        test]
       
  1333   [log.date|date:        Thu Jan 01 00:00:00 1970 +0000]
       
  1334   [ui.note log.description|description:]
       
  1335   [ui.note log.description|Modify, add, remove, rename]
       
  1336   
       
  1337   [ui.note log.files|files:]
       
  1338   [status.modified|M third]
       
  1339   [status.added|A b]
       
  1340   [status.added|A fifth]
       
  1341   [status.copied|  fourth]
       
  1342   [status.removed|R a]
       
  1343   [status.removed|R fourth]
       
  1344   
       
  1345   $ hg --color=debug log -T status -C -r 10 --debug
       
  1346   [log.changeset changeset.secret|changeset:   10:0f9759ec227a4859c2014a345cd8a859022b7c6c]
       
  1347   [log.tag|tag:         tip]
       
  1348   [log.phase|phase:       secret]
       
  1349   [log.parent changeset.secret|parent:      9:bf9dfba36635106d6a73ccc01e28b762da60e066]
       
  1350   [log.parent changeset.public|parent:      -1:0000000000000000000000000000000000000000]
       
  1351   [ui.debug log.manifest|manifest:    8:89dd546f2de0a9d6d664f58d86097eb97baba567]
       
  1352   [log.user|user:        test]
       
  1353   [log.date|date:        Thu Jan 01 00:00:00 1970 +0000]
       
  1354   [ui.debug log.extra|extra:       branch=default]
       
  1355   [ui.note log.description|description:]
       
  1356   [ui.note log.description|Modify, add, remove, rename]
       
  1357   
       
  1358   [ui.note log.files|files:]
       
  1359   [status.modified|M third]
       
  1360   [status.added|A b]
       
  1361   [status.added|A fifth]
       
  1362   [status.copied|  fourth]
       
  1363   [status.removed|R a]
       
  1364   [status.removed|R fourth]
       
  1365   
       
  1366   $ hg --color=debug log -T status -C -r 10 --quiet
       
  1367   [log.node|10:0f9759ec227a]
       
  1368 
       
  1369 Check the bisect template
       
  1370 
       
  1371   $ hg bisect -g 1
       
  1372   $ hg bisect -b 3 --noupdate
       
  1373   Testing changeset 2:97054abb4ab8 (2 changesets remaining, ~1 tests)
       
  1374   $ hg log -T bisect -r 0:4
       
  1375   changeset:   0:1e4e1b8f71e0
       
  1376   bisect:      good (implicit)
       
  1377   user:        User Name <user@hostname>
       
  1378   date:        Mon Jan 12 13:46:40 1970 +0000
       
  1379   summary:     line 1
       
  1380   
       
  1381   changeset:   1:b608e9d1a3f0
       
  1382   bisect:      good
       
  1383   user:        A. N. Other <other@place>
       
  1384   date:        Tue Jan 13 17:33:20 1970 +0000
       
  1385   summary:     other 1
       
  1386   
       
  1387   changeset:   2:97054abb4ab8
       
  1388   bisect:      untested
       
  1389   user:        other@place
       
  1390   date:        Wed Jan 14 21:20:00 1970 +0000
       
  1391   summary:     no person
       
  1392   
       
  1393   changeset:   3:10e46f2dcbf4
       
  1394   bisect:      bad
       
  1395   user:        person
       
  1396   date:        Fri Jan 16 01:06:40 1970 +0000
       
  1397   summary:     no user, no domain
       
  1398   
       
  1399   changeset:   4:bbe44766e73d
       
  1400   bisect:      bad (implicit)
       
  1401   branch:      foo
       
  1402   user:        person
       
  1403   date:        Sat Jan 17 04:53:20 1970 +0000
       
  1404   summary:     new branch
       
  1405   
       
  1406   $ hg log --debug -T bisect -r 0:4
       
  1407   changeset:   0:1e4e1b8f71e05681d422154f5421e385fec3454f
       
  1408   bisect:      good (implicit)
       
  1409   phase:       public
       
  1410   parent:      -1:0000000000000000000000000000000000000000
       
  1411   parent:      -1:0000000000000000000000000000000000000000
       
  1412   manifest:    0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0
       
  1413   user:        User Name <user@hostname>
       
  1414   date:        Mon Jan 12 13:46:40 1970 +0000
       
  1415   files+:      a
       
  1416   extra:       branch=default
       
  1417   description:
       
  1418   line 1
       
  1419   line 2
       
  1420   
       
  1421   
       
  1422   changeset:   1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965
       
  1423   bisect:      good
       
  1424   phase:       public
       
  1425   parent:      0:1e4e1b8f71e05681d422154f5421e385fec3454f
       
  1426   parent:      -1:0000000000000000000000000000000000000000
       
  1427   manifest:    1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55
       
  1428   user:        A. N. Other <other@place>
       
  1429   date:        Tue Jan 13 17:33:20 1970 +0000
       
  1430   files+:      b
       
  1431   extra:       branch=default
       
  1432   description:
       
  1433   other 1
       
  1434   other 2
       
  1435   
       
  1436   other 3
       
  1437   
       
  1438   
       
  1439   changeset:   2:97054abb4ab824450e9164180baf491ae0078465
       
  1440   bisect:      untested
       
  1441   phase:       public
       
  1442   parent:      1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965
       
  1443   parent:      -1:0000000000000000000000000000000000000000
       
  1444   manifest:    2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1
       
  1445   user:        other@place
       
  1446   date:        Wed Jan 14 21:20:00 1970 +0000
       
  1447   files+:      c
       
  1448   extra:       branch=default
       
  1449   description:
       
  1450   no person
       
  1451   
       
  1452   
       
  1453   changeset:   3:10e46f2dcbf4823578cf180f33ecf0b957964c47
       
  1454   bisect:      bad
       
  1455   phase:       public
       
  1456   parent:      2:97054abb4ab824450e9164180baf491ae0078465
       
  1457   parent:      -1:0000000000000000000000000000000000000000
       
  1458   manifest:    3:cb5a1327723bada42f117e4c55a303246eaf9ccc
       
  1459   user:        person
       
  1460   date:        Fri Jan 16 01:06:40 1970 +0000
       
  1461   files:       c
       
  1462   extra:       branch=default
       
  1463   description:
       
  1464   no user, no domain
       
  1465   
       
  1466   
       
  1467   changeset:   4:bbe44766e73d5f11ed2177f1838de10c53ef3e74
       
  1468   bisect:      bad (implicit)
       
  1469   branch:      foo
       
  1470   phase:       draft
       
  1471   parent:      3:10e46f2dcbf4823578cf180f33ecf0b957964c47
       
  1472   parent:      -1:0000000000000000000000000000000000000000
       
  1473   manifest:    3:cb5a1327723bada42f117e4c55a303246eaf9ccc
       
  1474   user:        person
       
  1475   date:        Sat Jan 17 04:53:20 1970 +0000
       
  1476   extra:       branch=foo
       
  1477   description:
       
  1478   new branch
       
  1479   
       
  1480   
       
  1481   $ hg log -v -T bisect -r 0:4
       
  1482   changeset:   0:1e4e1b8f71e0
       
  1483   bisect:      good (implicit)
       
  1484   user:        User Name <user@hostname>
       
  1485   date:        Mon Jan 12 13:46:40 1970 +0000
       
  1486   files:       a
       
  1487   description:
       
  1488   line 1
       
  1489   line 2
       
  1490   
       
  1491   
       
  1492   changeset:   1:b608e9d1a3f0
       
  1493   bisect:      good
       
  1494   user:        A. N. Other <other@place>
       
  1495   date:        Tue Jan 13 17:33:20 1970 +0000
       
  1496   files:       b
       
  1497   description:
       
  1498   other 1
       
  1499   other 2
       
  1500   
       
  1501   other 3
       
  1502   
       
  1503   
       
  1504   changeset:   2:97054abb4ab8
       
  1505   bisect:      untested
       
  1506   user:        other@place
       
  1507   date:        Wed Jan 14 21:20:00 1970 +0000
       
  1508   files:       c
       
  1509   description:
       
  1510   no person
       
  1511   
       
  1512   
       
  1513   changeset:   3:10e46f2dcbf4
       
  1514   bisect:      bad
       
  1515   user:        person
       
  1516   date:        Fri Jan 16 01:06:40 1970 +0000
       
  1517   files:       c
       
  1518   description:
       
  1519   no user, no domain
       
  1520   
       
  1521   
       
  1522   changeset:   4:bbe44766e73d
       
  1523   bisect:      bad (implicit)
       
  1524   branch:      foo
       
  1525   user:        person
       
  1526   date:        Sat Jan 17 04:53:20 1970 +0000
       
  1527   description:
       
  1528   new branch
       
  1529   
       
  1530   
       
  1531   $ hg --color=debug log -T bisect -r 0:4
       
  1532   [log.changeset changeset.public|changeset:   0:1e4e1b8f71e0]
       
  1533   [log.bisect bisect.good|bisect:      good (implicit)]
       
  1534   [log.user|user:        User Name <user@hostname>]
       
  1535   [log.date|date:        Mon Jan 12 13:46:40 1970 +0000]
       
  1536   [log.summary|summary:     line 1]
       
  1537   
       
  1538   [log.changeset changeset.public|changeset:   1:b608e9d1a3f0]
       
  1539   [log.bisect bisect.good|bisect:      good]
       
  1540   [log.user|user:        A. N. Other <other@place>]
       
  1541   [log.date|date:        Tue Jan 13 17:33:20 1970 +0000]
       
  1542   [log.summary|summary:     other 1]
       
  1543   
       
  1544   [log.changeset changeset.public|changeset:   2:97054abb4ab8]
       
  1545   [log.bisect bisect.untested|bisect:      untested]
       
  1546   [log.user|user:        other@place]
       
  1547   [log.date|date:        Wed Jan 14 21:20:00 1970 +0000]
       
  1548   [log.summary|summary:     no person]
       
  1549   
       
  1550   [log.changeset changeset.public|changeset:   3:10e46f2dcbf4]
       
  1551   [log.bisect bisect.bad|bisect:      bad]
       
  1552   [log.user|user:        person]
       
  1553   [log.date|date:        Fri Jan 16 01:06:40 1970 +0000]
       
  1554   [log.summary|summary:     no user, no domain]
       
  1555   
       
  1556   [log.changeset changeset.draft|changeset:   4:bbe44766e73d]
       
  1557   [log.bisect bisect.bad|bisect:      bad (implicit)]
       
  1558   [log.branch|branch:      foo]
       
  1559   [log.user|user:        person]
       
  1560   [log.date|date:        Sat Jan 17 04:53:20 1970 +0000]
       
  1561   [log.summary|summary:     new branch]
       
  1562   
       
  1563   $ hg --color=debug log --debug -T bisect -r 0:4
       
  1564   [log.changeset changeset.public|changeset:   0:1e4e1b8f71e05681d422154f5421e385fec3454f]
       
  1565   [log.bisect bisect.good|bisect:      good (implicit)]
       
  1566   [log.phase|phase:       public]
       
  1567   [log.parent changeset.public|parent:      -1:0000000000000000000000000000000000000000]
       
  1568   [log.parent changeset.public|parent:      -1:0000000000000000000000000000000000000000]
       
  1569   [ui.debug log.manifest|manifest:    0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0]
       
  1570   [log.user|user:        User Name <user@hostname>]
       
  1571   [log.date|date:        Mon Jan 12 13:46:40 1970 +0000]
       
  1572   [ui.debug log.files|files+:      a]
       
  1573   [ui.debug log.extra|extra:       branch=default]
       
  1574   [ui.note log.description|description:]
       
  1575   [ui.note log.description|line 1
       
  1576   line 2]
       
  1577   
       
  1578   
       
  1579   [log.changeset changeset.public|changeset:   1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965]
       
  1580   [log.bisect bisect.good|bisect:      good]
       
  1581   [log.phase|phase:       public]
       
  1582   [log.parent changeset.public|parent:      0:1e4e1b8f71e05681d422154f5421e385fec3454f]
       
  1583   [log.parent changeset.public|parent:      -1:0000000000000000000000000000000000000000]
       
  1584   [ui.debug log.manifest|manifest:    1:4e8d705b1e53e3f9375e0e60dc7b525d8211fe55]
       
  1585   [log.user|user:        A. N. Other <other@place>]
       
  1586   [log.date|date:        Tue Jan 13 17:33:20 1970 +0000]
       
  1587   [ui.debug log.files|files+:      b]
       
  1588   [ui.debug log.extra|extra:       branch=default]
       
  1589   [ui.note log.description|description:]
       
  1590   [ui.note log.description|other 1
       
  1591   other 2
       
  1592   
       
  1593   other 3]
       
  1594   
       
  1595   
       
  1596   [log.changeset changeset.public|changeset:   2:97054abb4ab824450e9164180baf491ae0078465]
       
  1597   [log.bisect bisect.untested|bisect:      untested]
       
  1598   [log.phase|phase:       public]
       
  1599   [log.parent changeset.public|parent:      1:b608e9d1a3f0273ccf70fb85fd6866b3482bf965]
       
  1600   [log.parent changeset.public|parent:      -1:0000000000000000000000000000000000000000]
       
  1601   [ui.debug log.manifest|manifest:    2:6e0e82995c35d0d57a52aca8da4e56139e06b4b1]
       
  1602   [log.user|user:        other@place]
       
  1603   [log.date|date:        Wed Jan 14 21:20:00 1970 +0000]
       
  1604   [ui.debug log.files|files+:      c]
       
  1605   [ui.debug log.extra|extra:       branch=default]
       
  1606   [ui.note log.description|description:]
       
  1607   [ui.note log.description|no person]
       
  1608   
       
  1609   
       
  1610   [log.changeset changeset.public|changeset:   3:10e46f2dcbf4823578cf180f33ecf0b957964c47]
       
  1611   [log.bisect bisect.bad|bisect:      bad]
       
  1612   [log.phase|phase:       public]
       
  1613   [log.parent changeset.public|parent:      2:97054abb4ab824450e9164180baf491ae0078465]
       
  1614   [log.parent changeset.public|parent:      -1:0000000000000000000000000000000000000000]
       
  1615   [ui.debug log.manifest|manifest:    3:cb5a1327723bada42f117e4c55a303246eaf9ccc]
       
  1616   [log.user|user:        person]
       
  1617   [log.date|date:        Fri Jan 16 01:06:40 1970 +0000]
       
  1618   [ui.debug log.files|files:       c]
       
  1619   [ui.debug log.extra|extra:       branch=default]
       
  1620   [ui.note log.description|description:]
       
  1621   [ui.note log.description|no user, no domain]
       
  1622   
       
  1623   
       
  1624   [log.changeset changeset.draft|changeset:   4:bbe44766e73d5f11ed2177f1838de10c53ef3e74]
       
  1625   [log.bisect bisect.bad|bisect:      bad (implicit)]
       
  1626   [log.branch|branch:      foo]
       
  1627   [log.phase|phase:       draft]
       
  1628   [log.parent changeset.public|parent:      3:10e46f2dcbf4823578cf180f33ecf0b957964c47]
       
  1629   [log.parent changeset.public|parent:      -1:0000000000000000000000000000000000000000]
       
  1630   [ui.debug log.manifest|manifest:    3:cb5a1327723bada42f117e4c55a303246eaf9ccc]
       
  1631   [log.user|user:        person]
       
  1632   [log.date|date:        Sat Jan 17 04:53:20 1970 +0000]
       
  1633   [ui.debug log.extra|extra:       branch=foo]
       
  1634   [ui.note log.description|description:]
       
  1635   [ui.note log.description|new branch]
       
  1636   
       
  1637   
       
  1638   $ hg --color=debug log -v -T bisect -r 0:4
       
  1639   [log.changeset changeset.public|changeset:   0:1e4e1b8f71e0]
       
  1640   [log.bisect bisect.good|bisect:      good (implicit)]
       
  1641   [log.user|user:        User Name <user@hostname>]
       
  1642   [log.date|date:        Mon Jan 12 13:46:40 1970 +0000]
       
  1643   [ui.note log.files|files:       a]
       
  1644   [ui.note log.description|description:]
       
  1645   [ui.note log.description|line 1
       
  1646   line 2]
       
  1647   
       
  1648   
       
  1649   [log.changeset changeset.public|changeset:   1:b608e9d1a3f0]
       
  1650   [log.bisect bisect.good|bisect:      good]
       
  1651   [log.user|user:        A. N. Other <other@place>]
       
  1652   [log.date|date:        Tue Jan 13 17:33:20 1970 +0000]
       
  1653   [ui.note log.files|files:       b]
       
  1654   [ui.note log.description|description:]
       
  1655   [ui.note log.description|other 1
       
  1656   other 2
       
  1657   
       
  1658   other 3]
       
  1659   
       
  1660   
       
  1661   [log.changeset changeset.public|changeset:   2:97054abb4ab8]
       
  1662   [log.bisect bisect.untested|bisect:      untested]
       
  1663   [log.user|user:        other@place]
       
  1664   [log.date|date:        Wed Jan 14 21:20:00 1970 +0000]
       
  1665   [ui.note log.files|files:       c]
       
  1666   [ui.note log.description|description:]
       
  1667   [ui.note log.description|no person]
       
  1668   
       
  1669   
       
  1670   [log.changeset changeset.public|changeset:   3:10e46f2dcbf4]
       
  1671   [log.bisect bisect.bad|bisect:      bad]
       
  1672   [log.user|user:        person]
       
  1673   [log.date|date:        Fri Jan 16 01:06:40 1970 +0000]
       
  1674   [ui.note log.files|files:       c]
       
  1675   [ui.note log.description|description:]
       
  1676   [ui.note log.description|no user, no domain]
       
  1677   
       
  1678   
       
  1679   [log.changeset changeset.draft|changeset:   4:bbe44766e73d]
       
  1680   [log.bisect bisect.bad|bisect:      bad (implicit)]
       
  1681   [log.branch|branch:      foo]
       
  1682   [log.user|user:        person]
       
  1683   [log.date|date:        Sat Jan 17 04:53:20 1970 +0000]
       
  1684   [ui.note log.description|description:]
       
  1685   [ui.note log.description|new branch]
       
  1686   
       
  1687   
       
  1688   $ hg bisect --reset
       
  1689 
       
  1690   $ cd ..
       
  1691 
       
  1692 Set up latesttag repository:
       
  1693 
       
  1694   $ hg init latesttag
       
  1695   $ cd latesttag
       
  1696 
       
  1697   $ echo a > file
       
  1698   $ hg ci -Am a -d '0 0'
       
  1699   adding file
       
  1700 
       
  1701   $ echo b >> file
       
  1702   $ hg ci -m b -d '1 0'
       
  1703 
       
  1704   $ echo c >> head1
       
  1705   $ hg ci -Am h1c -d '2 0'
       
  1706   adding head1
       
  1707 
       
  1708   $ hg update -q 1
       
  1709   $ echo d >> head2
       
  1710   $ hg ci -Am h2d -d '3 0'
       
  1711   adding head2
       
  1712   created new head
       
  1713 
       
  1714   $ echo e >> head2
       
  1715   $ hg ci -m h2e -d '4 0'
       
  1716 
       
  1717   $ hg merge -q
       
  1718   $ hg ci -m merge -d '5 -3600'
       
  1719 
       
  1720   $ hg tag -r 1 -m t1 -d '6 0' t1
       
  1721   $ hg tag -r 2 -m t2 -d '7 0' t2
       
  1722   $ hg tag -r 3 -m t3 -d '8 0' t3
       
  1723   $ hg tag -r 4 -m t4 -d '4 0' t4 # older than t2, but should not matter
       
  1724   $ hg tag -r 5 -m t5 -d '9 0' t5
       
  1725   $ hg tag -r 3 -m at3 -d '10 0' at3
       
  1726 
       
  1727   $ cd ..
       
  1728 
       
  1729 Style path expansion: issue1948 - ui.style option doesn't work on OSX
       
  1730 if it is a relative path
       
  1731 
       
  1732   $ mkdir -p home/styles
       
  1733 
       
  1734   $ cat > home/styles/teststyle <<EOF
       
  1735   > changeset = 'test {rev}:{node|short}\n'
       
  1736   > EOF
       
  1737 
       
  1738   $ HOME=`pwd`/home; export HOME
       
  1739 
       
  1740   $ cat > latesttag/.hg/hgrc <<EOF
       
  1741   > [ui]
       
  1742   > style = ~/styles/teststyle
       
  1743   > EOF
       
  1744 
       
  1745   $ hg -R latesttag tip
       
  1746   test 11:97e5943b523a
       
  1747 
       
  1748 Test recursive showlist template (issue1989):
       
  1749 
       
  1750   $ cat > style1989 <<EOF
       
  1751   > changeset = '{file_mods}{manifest}{extras}'
       
  1752   > file_mod  = 'M|{author|person}\n'
       
  1753   > manifest = '{rev},{author}\n'
       
  1754   > extra = '{key}: {author}\n'
       
  1755   > EOF
       
  1756 
       
  1757   $ hg -R latesttag log -r tip --style=style1989
       
  1758   M|test
       
  1759   11,test
       
  1760   branch: test