Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incremental changelog #26

Closed
vaab opened this issue Mar 11, 2015 · 8 comments
Closed

Incremental changelog #26

vaab opened this issue Mar 11, 2015 · 8 comments
Labels

Comments

@vaab
Copy link
Owner

vaab commented Mar 11, 2015

For several reason, building changelog incrementally is sometimes required, usually when you want to commit your CHANGELOG:

  • When wanting to switch to gitchangelog, or change your conventions:
    • part of your history is not following conventions.
    • you have a previous CHANGELOG you want to blend in.
  • You'd rather commit your changelog file:
    • For performance reason, you can then generate changelog only for the new commit and save the result.
    • Because you want to be able to edit it to make some minor edition if needed.

This would require gitchangelog to accept some rev-list type of argument, with optional detection of last revision made, and/or automatically insert in a file. This could be all driven by options in the config file, or command line arguments.

@vaab
Copy link
Owner Author

vaab commented May 8, 2015

@farcepest has a branch on start/end. Putting the commit refs here for later reference.
farcepest@1fb6438

@kminh
Copy link

kminh commented Sep 12, 2015

This is indeed a very useful feature to have as I already have existing changlog files.

Also, related to support existing changlog files, it would be nice to be able to customize the way each section is generated, for e.g. I don't use RST section for labels (i.e. New, Fix, Changes), I just want them to be a list and related commits are their list items.

@vaab
Copy link
Owner Author

vaab commented Sep 14, 2015

Ok, thanks for your feedback, note that sectioning concern is also marked in the missing feature in #21 with some workaround if this can help in the meantime.

vaab added a commit that referenced this issue Nov 10, 2015
…l changelog output (fixes #26)

See use cases documentations for more information.
@vaab
Copy link
Owner Author

vaab commented Nov 10, 2015

I've just committed a branch incremental-changelog ( https://github.com/vaab/gitchangelog/tree/incremental-changelog ) that implements incremental generation of changelog. This only implements:

 gitchangelog show REVLIST

Please look at additions in README.rst of the PR for more info. Any feedback (tests on your setup) are welcome.

Many thanks for your interests.

@kminh
Copy link

kminh commented Nov 11, 2015

Thanks for the update, will test it with my setup. Is it possible to have something like:

gitchangelog show HEAD
or
gitchangelog show HEAD^
gitchangelog show HEAD~1
...

Basically I would like to output the changelog relative to the current HEAD.

Perhaps the command that I would use the most is gitchangelog show HEAD, because I just want the latest (unversioned) changes when I release a new version. Maybe make it the default functionality of gitchangelog, and make gitchangelog show all list everything.

@vaab
Copy link
Owner Author

vaab commented Nov 11, 2015

Well, unless I've misunderstood, this is already working.
By default, calling:

gitchangelog

is equivalent (for compatibility with legacy) to call:

gitchangelog show

which is equivalent (by design) to call:

gitchangelog show HEAD

Which shows the complete changelog.

You are maybe interested by having only the last changes (since your last tag to HEAD). Which you can do by issuing gitchangelog show <LAST_TAG>..HEAD. There are several issues if I wanted to do it internally:

  • If it is unversionned (untagged), how do I figure the tag number to put as title of the section ?
  • If it is versionned, you might want to add several tags at once, how do I know what is the previous tags ?

As a start, I figured that these question could be answered externally from gitchangelog, if you know how to get the last valid tag with a bash oneliner either by looking in your previous changelog for the last entry that was stored, or through a simple git tag -l with some pipe magic to get your last tag, you can provide this to gitchangelog the easy way now.

I'm open to include a way to figure these out internally now, but it must provide maximum configurability. An option in the taste of subject_process, using some configurable pipelines for the most used variations would probably be the way to go.

@kminh
Copy link

kminh commented Nov 12, 2015

Sorry what I actually meant was: is there a way to quickly generate a changelog for the latest version (could be the last tag, HEAD or HEAD^ etc.) without specifying the exact tags? I believe that's what most people would want when releasing a new version. So running:

gitchangelog

should be equivalent to running one of the following:

# the latest version is unversioned (not tagged yet)
# get changelog from last stable version up to HEAD
gitchangelog show STABLE...HEAD
# or it is already tagged, get changelog from last previous version to the last stable version
gitchangelog show STABLE^...STABLE

I hope that makes sense, but not sure if doable at all.

@vaab
Copy link
Owner Author

vaab commented Oct 16, 2016

@kminh: I'll head toward a release of the previous feature, even if I read your last message and I acknowledge it doesn't fullfill all your requirements.

I'll create another issue to track the progress of the last part as I understood it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants