tests/test-releasenotes-formatting.t
author Martin von Zweigbergk <martinvonz@google.com>
Thu, 14 Sep 2017 11:16:47 -0700
branchstable
changeset 33675 b5d7e7d5c573
parent 33571 9a944e908ecf
child 33724 3748098d072a
permissions -rw-r--r--
tests: add test for issue5678 In addition to a test case for the direct problem described in the bug report, this also adds a test case showing how obsmarkers can also get lost when not using generaldelta. Differential Revision: https://phab.mercurial-scm.org/D714
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
32798
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     1
  $ cat >> $HGRCPATH << EOF
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     2
  > [extensions]
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     3
  > releasenotes=
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     4
  > EOF
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     5
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     6
  $ hg init simple-repo
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     7
  $ cd simple-repo
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     8
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
     9
A fix with a single line results in a bullet point in the appropriate section
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    10
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    11
  $ touch fix1
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    12
  $ hg -q commit -A -l - << EOF
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    13
  > single line fix
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    14
  > 
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    15
  > .. fix::
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    16
  > 
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    17
  >    Simple fix with a single line content entry.
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    18
  > EOF
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    19
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    20
  $ hg releasenotes -r . $TESTTMP/relnotes-single-line
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    21
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    22
  $ cat $TESTTMP/relnotes-single-line
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    23
  Bug Fixes
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    24
  =========
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    25
  
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    26
  * Simple fix with a single line content entry.
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    27
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    28
A fix with multiple lines is handled correctly
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    29
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    30
  $ touch fix2
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    31
  $ hg -q commit -A -l - << EOF
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    32
  > multi line fix
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    33
  > 
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    34
  > .. fix::
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    35
  > 
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    36
  >    First line of fix entry.
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    37
  >    A line after it without a space.
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    38
  > 
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    39
  >    A new paragraph in the fix entry. And this is a really long line. It goes on for a while.
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    40
  >    And it wraps around to a new paragraph.
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    41
  > EOF
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    42
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    43
  $ hg releasenotes -r . $TESTTMP/relnotes-multi-line
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    44
  $ cat $TESTTMP/relnotes-multi-line
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    45
  Bug Fixes
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    46
  =========
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    47
  
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    48
  * First line of fix entry. A line after it without a space.
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    49
  
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    50
    A new paragraph in the fix entry. And this is a really long line. It goes on
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    51
    for a while. And it wraps around to a new paragraph.
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    52
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    53
A release note with a title results in a sub-section being written
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    54
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    55
  $ touch fix3
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    56
  $ hg -q commit -A -l - << EOF
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    57
  > fix with title
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    58
  > 
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    59
  > .. fix:: Fix Title
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    60
  > 
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    61
  >    First line of fix with title.
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    62
  > 
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    63
  >    Another paragraph of fix with title. But this is a paragraph
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    64
  >    with multiple lines.
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    65
  > EOF
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    66
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    67
  $ hg releasenotes -r . $TESTTMP/relnotes-fix-with-title
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    68
  $ cat $TESTTMP/relnotes-fix-with-title
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    69
  Bug Fixes
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    70
  =========
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    71
  
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    72
  Fix Title
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    73
  ---------
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    74
  
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    75
  First line of fix with title.
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    76
  
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    77
  Another paragraph of fix with title. But this is a paragraph with multiple
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    78
  lines.
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    79
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    80
  $ cd ..
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    81
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    82
Formatting of multiple bullet points works
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    83
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    84
  $ hg init multiple-bullets
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    85
  $ cd multiple-bullets
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    86
  $ touch fix1
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    87
  $ hg -q commit -A -l - << EOF
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    88
  > commit 1
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    89
  > 
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    90
  > .. fix::
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    91
  > 
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    92
  >    first fix
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    93
  > EOF
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    94
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    95
  $ touch fix2
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    96
  $ hg -q commit -A -l - << EOF
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    97
  > commit 2
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    98
  > 
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
    99
  > .. fix::
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   100
  > 
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   101
  >    second fix
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   102
  > 
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   103
  >    Second paragraph of second fix.
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   104
  > EOF
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   105
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   106
  $ touch fix3
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   107
  $ hg -q commit -A -l - << EOF
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   108
  > commit 3
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   109
  > 
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   110
  > .. fix::
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   111
  > 
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   112
  >    third fix
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   113
  > EOF
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   114
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   115
  $ hg releasenotes -r 'all()' $TESTTMP/relnotes-multiple-bullets
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   116
  $ cat $TESTTMP/relnotes-multiple-bullets
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   117
  Bug Fixes
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   118
  =========
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   119
  
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   120
  * first fix
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   121
  
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   122
  * second fix
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   123
  
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   124
    Second paragraph of second fix.
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   125
  
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   126
  * third fix
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   127
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   128
  $ cd ..
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   129
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   130
Formatting of multiple sections works
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   131
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   132
  $ hg init multiple-sections
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   133
  $ cd multiple-sections
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   134
  $ touch fix1
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   135
  $ hg -q commit -A -l - << EOF
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   136
  > commit 1
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   137
  > 
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   138
  > .. fix::
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   139
  > 
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   140
  >    first fix
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   141
  > EOF
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   142
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   143
  $ touch feature1
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   144
  $ hg -q commit -A -l - << EOF
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   145
  > commit 2
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   146
  > 
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   147
  > .. feature::
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   148
  > 
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   149
  >    description of the new feature
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   150
  > EOF
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   151
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   152
  $ touch fix2
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   153
  $ hg -q commit -A -l - << EOF
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   154
  > commit 3
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   155
  > 
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   156
  > .. fix::
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   157
  > 
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   158
  >    second fix
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   159
  > EOF
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   160
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   161
  $ hg releasenotes -r 'all()' $TESTTMP/relnotes-multiple-sections
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   162
  $ cat $TESTTMP/relnotes-multiple-sections
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   163
  New Features
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   164
  ============
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   165
  
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   166
  * description of the new feature
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   167
  
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   168
  Bug Fixes
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   169
  =========
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   170
  
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   171
  * first fix
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   172
  
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   173
  * second fix
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   174
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   175
  $ cd ..
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   176
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   177
Section with subsections and bullets
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   178
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   179
  $ hg init multiple-subsections
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   180
  $ cd multiple-subsections
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   181
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   182
  $ touch fix1
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   183
  $ hg -q commit -A -l - << EOF
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   184
  > commit 1
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   185
  > 
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   186
  > .. fix:: Title of First Fix
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   187
  > 
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   188
  >    First paragraph of first fix.
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   189
  > 
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   190
  >    Second paragraph of first fix.
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   191
  > EOF
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   192
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   193
  $ touch fix2
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   194
  $ hg -q commit -A -l - << EOF
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   195
  > commit 2
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   196
  > 
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   197
  > .. fix:: Title of Second Fix
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   198
  > 
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   199
  >    First paragraph of second fix.
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   200
  > 
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   201
  >    Second paragraph of second fix.
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   202
  > EOF
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   203
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   204
  $ hg releasenotes -r 'all()' $TESTTMP/relnotes-multiple-subsections
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   205
  $ cat $TESTTMP/relnotes-multiple-subsections
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   206
  Bug Fixes
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   207
  =========
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   208
  
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   209
  Title of First Fix
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   210
  ------------------
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   211
  
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   212
  First paragraph of first fix.
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   213
  
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   214
  Second paragraph of first fix.
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   215
  
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   216
  Title of Second Fix
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   217
  -------------------
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   218
  
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   219
  First paragraph of second fix.
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   220
  
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   221
  Second paragraph of second fix.
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   222
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   223
Now add bullet points to sections having sub-sections
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   224
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   225
  $ touch fix3
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   226
  $ hg -q commit -A -l - << EOF
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   227
  > commit 3
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   228
  > 
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   229
  > .. fix::
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   230
  > 
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   231
  >    Short summary of fix 3
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   232
  > EOF
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   233
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   234
  $ hg releasenotes -r 'all()' $TESTTMP/relnotes-multiple-subsections-with-bullets
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   235
  $ cat $TESTTMP/relnotes-multiple-subsections-with-bullets
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   236
  Bug Fixes
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   237
  =========
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   238
  
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   239
  Title of First Fix
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   240
  ------------------
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   241
  
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   242
  First paragraph of first fix.
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   243
  
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   244
  Second paragraph of first fix.
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   245
  
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   246
  Title of Second Fix
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   247
  -------------------
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   248
  
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   249
  First paragraph of second fix.
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   250
  
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   251
  Second paragraph of second fix.
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   252
  
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   253
  Other Changes
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   254
  -------------
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   255
  
91e355a0408b releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
   256
  * Short summary of fix 3
32799
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   257
33571
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   258
  $ cd ..
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   259
32799
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   260
Multiple 'Other Changes' sub-sections for every section
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   261
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   262
  $ hg init multiple-otherchanges
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   263
  $ cd multiple-otherchanges
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   264
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   265
  $ touch fix1
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   266
  $ hg -q commit -A -l - << EOF
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   267
  > commit 1
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   268
  > 
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   269
  > .. fix:: Title of First Fix
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   270
  > 
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   271
  >    First paragraph of fix 1.
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   272
  > EOF
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   273
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   274
  $ touch feature1
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   275
  $ hg -q commit -A -l - << EOF
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   276
  > commit 2
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   277
  > 
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   278
  > .. feature:: Title of First Feature
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   279
  > 
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   280
  >    First paragraph of feature 1.
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   281
  > EOF
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   282
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   283
  $ touch feature2
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   284
  $ hg -q commit -A -l - << EOF
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   285
  > commit 3
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   286
  > 
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   287
  > .. feature::
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   288
  > 
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   289
  >    Short summary of feature 2.
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   290
  > EOF
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   291
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   292
  $ touch fix2
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   293
  $ hg -q commit -A -l - << EOF
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   294
  > commit 4
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   295
  > 
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   296
  > .. fix::
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   297
  > 
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   298
  >    Short summary of fix 2
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   299
  > EOF
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   300
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   301
  $ hg releasenotes -r 'all()' $TESTTMP/relnotes-multiple-otherchanges
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   302
  $ cat $TESTTMP/relnotes-multiple-otherchanges
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   303
  New Features
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   304
  ============
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   305
  
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   306
  Title of First Feature
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   307
  ----------------------
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   308
  
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   309
  First paragraph of feature 1.
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   310
  
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   311
  Other Changes
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   312
  -------------
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   313
  
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   314
  * Short summary of feature 2.
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   315
  
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   316
  Bug Fixes
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   317
  =========
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   318
  
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   319
  Title of First Fix
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   320
  ------------------
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   321
  
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   322
  First paragraph of fix 1.
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   323
  
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   324
  Other Changes
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   325
  -------------
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   326
  
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   327
  * Short summary of fix 2
2510823ca0df releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32798
diff changeset
   328
33571
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   329
  $ cd ..
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   330
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   331
Using custom sections in notes
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   332
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   333
  $ hg init custom-section
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   334
  $ cd custom-section
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   335
  $ cat >> .hgreleasenotes << EOF
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   336
  > [sections]
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   337
  > testsection=Name of Section
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   338
  > EOF
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   339
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   340
  $ touch a
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   341
  $ hg -q commit -A -l - << EOF
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   342
  > commit 1
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   343
  > 
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   344
  > .. testsection::
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   345
  > 
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   346
  >    First paragraph under this admonition.
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   347
  > EOF
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   348
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   349
  $ hg releasenotes -r . $TESTTMP/relnotes-custom-section
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   350
  $ cat $TESTTMP/relnotes-custom-section
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   351
  Name of Section
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   352
  ===============
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   353
  
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   354
  * First paragraph under this admonition.
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   355
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   356
Overriding default sections (For eg. by default feature = New Features)
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   357
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   358
  $ cat >> .hgreleasenotes << EOF
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   359
  > [sections]
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   360
  > feature=Feature Additions
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   361
  > EOF
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   362
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   363
  $ touch b
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   364
  $ hg -q commit -A -l - << EOF
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   365
  > commit 2
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   366
  > 
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   367
  > .. feature::
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   368
  > 
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   369
  >    Adds a new feature.
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   370
  > EOF
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   371
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   372
  $ hg releasenotes -r . $TESTTMP/relnotes-override-section
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   373
  $ cat $TESTTMP/relnotes-override-section
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   374
  Feature Additions
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   375
  =================
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   376
  
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   377
  * Adds a new feature.
9a944e908ecf releasenotes: add custom admonitions support for release notes
Rishabh Madan <rishabhmadan96@gmail.com>
parents: 32799
diff changeset
   378