Re: Summer of Code project ideas due this Friday
- From
- Santi Béjar <santi@agolina.net>
- Date
- Mar 10, 2011, 18:17 UTC
- Message-ID
- <AANLkTim9a89WZdMBYWjTH0p_SR+cy80ndogGJeguKxyE@mail.gmail.com>
- In-Reply-To
- <201103101815.23477.trast@student.ethz.ch>
On Thu, Mar 10, 2011 at 6:15 PM, Thomas Rast <trast@student.ethz.ch> wrote:
Show 14 quoted lines
> 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