ros-infrastructure / catkin_pkg

Standalone Python library for the catkin build system.
https://github.com/ros/catkin
Other
47 stars 91 forks source link

catkin_generate_changelog --all Includes Non-Ancestor Tags #130

Closed evenator closed 8 years ago

evenator commented 8 years ago

When generating a changelog, "future" versions (and tags on unmerged branches) should not be included in the changelog. The current behavior of catkin_generate_changelog --all is to generate a changelog entry for every tag in the git repository, even if that tag is not an "ancestor" of the current HEAD.

Proposed fix: Use some parsing of git log --simplify-by-decoration --pretty="%d" HEAD instead of git tag to generate the tag list for changelogs. This will only show tags that are "ancestors" of the current HEAD.

This doesn't address other VCSs, but I think git is the main usecase for catkin_generate_changelog.

dirk-thomas commented 8 years ago

That sounds like a good improvement. git log --simplify-by-decoration --pretty="%d" should be enough. The command will then start wherever you are (commonly HEAD).

Can you please provide a PR adding this?