This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ezio.melotti
Recipients brett.cannon, ezio.melotti, georg.brandl, lemburg, ncoghlan, pitrou, r.david.murray, sbt, terry.reedy, tshepang, zach.ware
Date 2014-04-23.17:24:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1398273858.3.0.37733343854.issue18967@psf.upfronthosting.co.za>
In-reply-to
Content
One of the Mercurial devs convinced me to pursue what I had initially proposed in msg197645 and write a merge script (attached).

The script is still a proof of concept, it makes a few assumptions and doesn't handle all the cases, but I did a few tests and it seems to work for at least some cases.  If people like it it can be improved.

In short it parses Misc/NEWS, see what news entries have been added in the changeset(s) that it's being merged, and adds them at the top of the corresponding section.

To enable it download the file, set it as executable (chmod +x newsmerge.py), and add the following to .hg/hgrc:

[merge-tools]
newsmerge.executable = /path/to/newsmerge.py
newsmerge.priority = 100
newsmerge.premerge = True
newsmerge.args = $base $local $other -o $output

[merge-patterns]
Misc/NEWS = newsmerge

This will kick in only if the regular merge results in a conflict (so if you don't see any of the debug output from newsmerge it means that mercurial managed to merge Misc/NEWS on its own without conflicts).
History
Date User Action Args
2014-04-23 17:24:18ezio.melottisetrecipients: + ezio.melotti, lemburg, brett.cannon, georg.brandl, terry.reedy, ncoghlan, pitrou, r.david.murray, tshepang, sbt, zach.ware
2014-04-23 17:24:18ezio.melottisetmessageid: <1398273858.3.0.37733343854.issue18967@psf.upfronthosting.co.za>
2014-04-23 17:24:18ezio.melottilinkissue18967 messages
2014-04-23 17:24:17ezio.melotticreate