##// END OF EJS Templates
evolution: rename unstable to orphan...
evolution: rename unstable to orphan Rename unstable to orphan in all external user-facing output. Only update user-facing output for the moment, variables names, templates keyword and potentially configuration would be done in later series. The renaming is done according to https://www.mercurial-scm.org/wiki/CEDVocabulary. Differential Revision: https://phab.mercurial-scm.org/D214

File last commit:

r33012:5814db57 default
r33632:03039ff3 default
Show More
test-releasenotes-merging.t
160 lines | 2.8 KiB | text/troff | Tads3Lexer
/ tests / test-releasenotes-merging.t
$ cat >> $HGRCPATH << EOF
> [extensions]
> releasenotes=
> EOF
$ hg init simple-repo
$ cd simple-repo
A fix directive from commit message is added to release notes
$ touch fix1
$ hg -q commit -A -l - << EOF
> commit 1
>
> .. fix::
>
> Fix from commit message.
> EOF
$ cat >> $TESTTMP/single-fix-bullet << EOF
> Bug Fixes
> =========
>
> * Fix from release notes.
> EOF
$ hg releasenotes -r . $TESTTMP/single-fix-bullet
$ cat $TESTTMP/single-fix-bullet
Bug Fixes
=========
* Fix from release notes.
* Fix from commit message.
Processing again ignores the already added bullet.
$ hg releasenotes -r . $TESTTMP/single-fix-bullet
$ cat $TESTTMP/single-fix-bullet
Bug Fixes
=========
* Fix from release notes.
* Fix from commit message.
$ cd ..
Sections are unioned
$ hg init subsections
$ cd subsections
$ touch fix1
$ hg -q commit -A -l - << EOF
> Commit 1
>
> .. feature:: Commit Message Feature
>
> This describes a feature from a commit message.
> EOF
$ cat >> $TESTTMP/single-feature-section << EOF
> New Features
> ============
>
> Notes Feature
> -------------
>
> This describes a feature from a release notes file.
> EOF
$ hg releasenotes -r . $TESTTMP/single-feature-section
$ cat $TESTTMP/single-feature-section
New Features
============
Notes Feature
-------------
This describes a feature from a release notes file.
Commit Message Feature
----------------------
This describes a feature from a commit message.
Doing it again won't add another section
$ hg releasenotes -r . $TESTTMP/single-feature-section
Commit Message Feature already exists in feature section; ignoring
$ cat $TESTTMP/single-feature-section
New Features
============
Notes Feature
-------------
This describes a feature from a release notes file.
Commit Message Feature
----------------------
This describes a feature from a commit message.
$ cd ..
Bullets from rev merge with those from notes file.
$ hg init bullets
$ cd bullets
$ touch fix1
$ hg -q commit -A -l - << EOF
> commit 1
>
> .. fix::
>
> this is fix1.
> EOF
$ touch fix2
$ hg -q commit -A -l - << EOF
> commit 2
>
> .. fix::
>
> this is fix2.
> EOF
$ hg releasenotes -r 'all()' $TESTTMP/relnotes-bullet-problem
$ cat $TESTTMP/relnotes-bullet-problem
Bug Fixes
=========
* this is fix1.
* this is fix2.
$ touch fix3
$ hg -q commit -A -l - << EOF
> commit 3
>
> .. fix::
>
> this is fix3.
> EOF
$ hg releasenotes -r . $TESTTMP/relnotes-bullet-problem
$ cat $TESTTMP/relnotes-bullet-problem
Bug Fixes
=========
* this is fix1.
* this is fix2.
* this is fix3.