Re: Summer of Code project ideas due this Friday

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 10, 2011 at 6:15 PM, Thomas Rast <trast@xxxxxxxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]