From: Santi Béjar Date: Thu, 10 Mar 2011 18:17:31 GMT Subject: Re: Summer of Code project ideas due this Friday Message-ID: In-Reply-To: <201103101815.23477.trast@student.ethz.ch> On Thu, Mar 10, 2011 at 6:15 PM, Thomas Rast wrote: > Jonathan Nieder wrote: >> Thanks for a pointer.  Some ideas still at the "throw them against the >> wall and see if they stick" stage: please feel free to add to the page >> if you think you can find subsets with the right scope. > > Some stuff off the top of my head, please apply a similar filter: > > * Word-based merge helper > >  The existing merge algorithms are all tailored to line-based formats >  such as code.  Writing, e.g., LaTeX or even asciidoc requires >  sticking to a strict word-wrapped format.  Worse even, re-wrapping >  leads to headaches if people work on the same areas a lot, much like >  the effects of code reindents. Not a complete/right solution (and not even extensively tested), but I did a "trivial" merge program for LaTeX files that: 1.- Rewraps all files as the first one, using dwdiff 2.- Perform a normal line based merge [wlmerge] #!/bin/bash tmp1=$(mktemp -t wlmerge.XXXXXXX) tmp2=$(mktemp -t wlmerge.XXXXXXX) trap "rm -f $tmp1 $tmp2" 0 1 2 3 15 [ ! -e "$1" ] && exit 1 file1=$1 && shift [ ! -e "$1" ] && exit 1 orig=$1 && shift [ ! -e "$1" ] && exit 1 file2=$1 && shift dwdiff -2 -w "" -x "" "$orig" "$file1" > $tmp1 dwdiff -2 -w "" -x "" "$file2" "$file1" > $tmp2 merge "$file1" $tmp1 $tmp2 I even have a "wldiff", but nowadays I use --color-words exclusively! HTH, Santi