Yuri Astrakhan yuriastrakhan@gmail.com wrote:
As I wrote at
http://www.mediawiki.org/wiki/Talk:Git/Workflow#Release_notes_conflicts_2076... , this can be easily re-streamlined with a merge driver. As release notes for MediaWiki are probably mostly additions, it shouldn't be too hard to cover the common cases, and we certainly don't have the ambition to do text analysis in C, but can settle for Perl (or Python or even PHP :-)) instead.
Tim, it would be great if this worked on the gerrit side, but apparently
it has to be implemented in java in order to work with the gerrit server (at least that's what i was told). Implementing a core gerrit feature like that might be a bit more resource intensive than having a simple bot... (?)
Apparently, this is really not possible. Gerrit seems to use JGit for the basic stuff, and merge drivers aren't part of that. NIH sucks.
Bartosz DziewoĆski matma.rex@gmail.com wrote:
As I wrote at http://www.mediawiki.org/wiki/Talk:Git/Workflow#Release_notes_conflicts_2076..., this can be easily re-streamlined with a merge driver. As release notes for MediaWiki are probably mostly additions, it shouldn't be too hard to cover the common cases, and we certainly don't have the ambition to do text analysis in C, but can settle for Perl (or Python or even PHP :-)) instead.
I wrote a very simple one some time ago, in Ruby. https://github.com/MatmaRex/mediawikireleasenotes-driver
It doesn't really work. There are enough changes that are not simple additions that it solves no more than about 30% conflics for me. Maybe that rate could be improved using, like, a real algorithm for merging; but the naive solution doesn't really work.
Ah, actual, running code! :-) 30 % isn't that bad for about ten (!) lines. And it helps developers as it means rebases might still be necessary, but can be automated in 30 % of the times without manual intervention.
Let's add your driver to http://www.mediawiki.org/wiki/Git/Workflow#Build_failed_due_to_merge_conflic.... I think it's probably preferable to have a separate file for the driver itself and manual installation instructions as otherwise people will just complain "mediawikireleasenotes-driver-installer.sh didn't work for my setup!!11!", but that's no blocker.
Tim