Automagically merging ChangeLog files with mercurial or git
When a project keeps a GNU style ChangeLog file to keep track of who changed what where then those files can be automagically merged if you use mercurial or git.
gnulib contains a module git-merge-changelog, which despite the name work perfectly with several version control systems.
To install it:
git clone git://git.savannah.gnu.org/gnulib.git cd gnulib ./gnulib-tool --create-testdir --dir=/tmp/testdir123 git-merge-changelog cd /tmp/testdir123 ./configure make make install
For Mercurial add the following lines to your ~/.hgrc:
[merge-patterns] ChangeLog = git-merge-changelog [merge-tools] git-merge-changelog.executable = /usr/local/bin/git-merge-changelog git-merge-changelog.args = $base $local $other
For git add the following lines to your ~/.gitconfig
[merge "merge-changelog"] name = GNU-style ChangeLog merge driver driver = /usr/local/bin/git-merge-changelog %O %A %B
And never worry again about having to manually merge ChangeLog files.
