Git and Automatic ChangeLog Generation
After our move to use Git and GitHub to host our repository I got thinking about ChangeLogs. Having a version controlled file, where you manually add details about what the version control system should be recording seems like it should not be necessary. I searched and couldn't find a solution that generates ChangeLogs in the style we prefer, which is a variant of the GNU ChangeLog.
So I wrote a quick Python script to try and accomplish this task. It may not be the prettiest Python code as I have never written more than five or six lines of Python before. ChangeLogs always seemed to be the biggest source of merge conflicts whenever we would work in branches, or just all be working at the same time. This is why I think it is necessary to automatically generate something like this that can be generated with source tarballs.
I called it gitlog2changelog.py and it has all of the basics down already. It may not be the most general script but works pretty well for us. I need to add some extra parsing for file creation/deletion so that we can add the + or - in front of the file names. Is there a general need for this? Are there better scripts out there that I dd not spot?
2008-12-29 Tim Vandermeersch <email@protected>
∗ libavogadro/src/pluginmanager.cpp: replace getenv(...) with
QProcess::systemEnvironment()
∗ libavogadro/src/elementtranslate.h: Replace "A_DECL_EXPORT extern ..." with
"A_EXPORT extern ..."
∗ CMakeLists.txt: use /MD compiler flag for MSVC
2008-12-28 Marcus D. Hanwell <email@protected>
∗ libavogadro/src/molecule.cpp, libavogadro/src/molecule.h,
libavogadro/src/python/molecule.cpp: Lots of documentation updates,
reorganised the functions and grouped in Doxygen tags. Some minor changes
too, more are needed for const correctness.
∗ testfiles/multicubes.cube.gz: Removed from our source as it is the same
size as all the other files put together. May be we should provide a more
extensive sample of files in a separate distribution.
∗ libavogadro/src/engines/bsdyengine.cpp: Ported to use the new bond position
functions.
∗ libavogadro/src/bond.cpp, libavogadro/src/bond.h: Added functions to
retrieve bond positions, still need to implement the mid-point function.
∗ libavogadro/src/bond.h: Documentation updates.
∗ libavogadro/src/python/bond.cpp: Added missing Atom include.
∗ libavogadro/src/atom.cpp, libavogadro/src/atom.h: Documentation updates,
added member function groupings and a destructor.
∗ libavogadro/src/atom.cpp, libavogadro/src/bond.cpp, libavogadro/src/bond.h:
Added some atom accessor functions to the Bond class. This should make using
bonds easier. Fixed assignment order in Atom constructor.
Comments
Display comments as Linear | Threaded
hades on :
I suppose every project write their own script, if they need it.
Btw, I had to surf from kernel.org to find git's own changelog, google proved helpless.
Marcus D. Hanwell on :
I am open to opinions one way or the other on this. Especially when the repo is publicly accessible and anyone can grab it or view it from their browser.
Ian Monroe on :
I really don't get the point of saving the git log into the CHANGELOG. The only people it means anything to have access to 'git log'.
Marcus D. Hanwell on :
I agree with you that for users it is fairly useless, and our repository is available online for all to browse. A what's new style section is often much more useful and we tend to do that too. For me part of the motivation was to write something in Python and see if it was possible to generate this kind of thing should we want to distribute it with our sources.
Geoff Hutchison on :
I think there are a few advantages of full ChangeLogs for more technically adept users and packagers. That way, you can see if particular bugs have been fixed, etc. Yes. the repository is open, but it's often faster to look through a good ChangeLog.
JP on :
Berry on :