[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: "svn diff" and "svn merge" sittin' in a tree

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2002-02-15 16:49:50 CET

Philip Martin <philip@codematters.co.uk> writes:

> Here is basic diff + patch
>
> $ diff -u file2 file3 | patch file1
> patching file `file1'
> Hunk #1 FAILED at 1.
> 1 out of 1 hunk FAILED -- saving rejects to file1.rej
>
> Here is a 3-way merge, 3-way diff, whatever you want to call it
>
> $ merge -p file1 file2 file3
> change C
> line 1
> line 2 change A
> line 3
> line 4 change B
> line 5
> line 6

Ahhhhh, this is a very clear picture. There's nothing *theoretically*
different about these two different methods. But from an
*implementation* point-of-view, the fuzzy diffing and patching
heuristics are likely to work better if they can see the entirety of
all three files. And the great thing is that libsvn_wc *does* have
all three fulltexts when doing a merge.

I'm all for rewriting svn_wc_install_file() to use diff3, then,
instead of diff+patch. It should make that code smaller, and result
in fewer conflicts.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:37:08 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.