On Tue, Jun 14, 2011 at 6:50 PM, Peter Samuelson <peter_at_p12n.org> wrote:
>
> [Neels J Hofmeyr]
>> it's been a while and I still haven't sent you my diff wish we briefly
>> touched on the Subversion hackathon.
>
> While we're on the subject of 'diff wish', my wish is that diff3 could
> remove lines from the top and bottom of a conflict region that are the
> same on both "sides". Whether this happens as a natural part of the
> implementation, or in a post-processing step, I don't care so much.
> But at present, Subversion frequently gives me a conflict region that
> includes a lot of identical text above and below the actual conflict.
> --
> Peter Samuelson | org-tld!p12n!peter | http://p12n.org/
>
> [[[
> Repro script. The merge conflict region that shows up in TMP_wc/f is too large.
> ]]]
> #!/bin/sh -x
>
> rm -fr TMP_repos TMP_wc
> svnadmin create TMP_repos
> svn co file://$(pwd)/TMP_repos TMP_wc
> cd TMP_wc
>
> # r1: Create file f
> cat > f <<EOF
> a
> b
> EOF
> svn add f
> svn ci -mm
>
> # r2: Branch, then do conflicting edits to both files
> svn cp f g
> cat > f <<EOF
> a
> 1
> 3
> b
> EOF
> cat > g <<EOF
> a
> 1
> 2
> 3
> b
> EOF
> svn ci -mm
>
> # Finally, produce a merge conflict
> svn merge --non-interactive -c2 g f
Ah, but if I'm not mistaken that's just the kind of improvement that
was suggested by Morten in the recent thread "Improvements to diff3
(merge) performance" [1]. There was some interesting exchange there
about the pros and cons, and risks and such. Maybe you should add your
thoughts to that thread?
Cheers,
--
Johan
[1] http://svn.haxx.se/dev/archive-2011-06/0352.shtml
Received on 2011-06-14 23:59:06 CEST