tests/test-releasenotes-merging.t
changeset 32778 91e355a0408b
child 32779 2510823ca0df
equal deleted inserted replaced
32777:9dccaff02ad5 32778:91e355a0408b
       
     1   $ cat >> $HGRCPATH << EOF
       
     2   > [extensions]
       
     3   > releasenotes=
       
     4   > EOF
       
     5 
       
     6   $ hg init simple-repo
       
     7   $ cd simple-repo
       
     8 
       
     9 A fix directive from commit message is added to release notes
       
    10 
       
    11   $ touch fix1
       
    12   $ hg -q commit -A -l - << EOF
       
    13   > commit 1
       
    14   > 
       
    15   > .. fix::
       
    16   > 
       
    17   >    Fix from commit message.
       
    18   > EOF
       
    19 
       
    20   $ cat >> $TESTTMP/single-fix-bullet << EOF
       
    21   > Bug Fixes
       
    22   > =========
       
    23   > 
       
    24   > * Fix from release notes.
       
    25   > EOF
       
    26 
       
    27   $ hg releasenotes -r . $TESTTMP/single-fix-bullet
       
    28 
       
    29   $ cat $TESTTMP/single-fix-bullet
       
    30   Bug Fixes
       
    31   =========
       
    32   
       
    33   * Fix from release notes.
       
    34   
       
    35   * Fix from commit message.
       
    36 
       
    37 Processing again will no-op
       
    38 TODO this is buggy
       
    39 
       
    40   $ hg releasenotes -r . $TESTTMP/single-fix-bullet
       
    41 
       
    42   $ cat $TESTTMP/single-fix-bullet
       
    43   Bug Fixes
       
    44   =========
       
    45   
       
    46   * Fix from release notes.
       
    47   
       
    48     Fix from commit message.
       
    49   
       
    50   * Fix from commit message.
       
    51 
       
    52   $ cd ..
       
    53 
       
    54 Sections are unioned
       
    55 
       
    56   $ hg init subsections
       
    57   $ cd subsections
       
    58   $ touch fix1
       
    59   $ hg -q commit -A -l - << EOF
       
    60   > Commit 1
       
    61   > 
       
    62   > .. feature:: Commit Message Feature
       
    63   > 
       
    64   >    This describes a feature from a commit message.
       
    65   > EOF
       
    66 
       
    67   $ cat >> $TESTTMP/single-feature-section << EOF
       
    68   > New Features
       
    69   > ============
       
    70   > 
       
    71   > Notes Feature
       
    72   > -------------
       
    73   > 
       
    74   > This describes a feature from a release notes file.
       
    75   > EOF
       
    76 
       
    77   $ hg releasenotes -r . $TESTTMP/single-feature-section
       
    78 
       
    79   $ cat $TESTTMP/single-feature-section
       
    80   New Features
       
    81   ============
       
    82   
       
    83   Notes Feature
       
    84   -------------
       
    85   
       
    86   This describes a feature from a release notes file.
       
    87   
       
    88   Commit Message Feature
       
    89   ----------------------
       
    90   
       
    91   This describes a feature from a commit message.
       
    92 
       
    93 Doing it again won't add another section
       
    94 
       
    95   $ hg releasenotes -r . $TESTTMP/single-feature-section
       
    96   Commit Message Feature already exists in feature section; ignoring
       
    97 
       
    98   $ cat $TESTTMP/single-feature-section
       
    99   New Features
       
   100   ============
       
   101   
       
   102   Notes Feature
       
   103   -------------
       
   104   
       
   105   This describes a feature from a release notes file.
       
   106   
       
   107   Commit Message Feature
       
   108   ----------------------
       
   109   
       
   110   This describes a feature from a commit message.
       
   111 
       
   112   $ cd ..