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

Re: Automerge algorithm ...

From: Ryan Schmidt <subversion-2006q2_at_ryandesign.com>
Date: 2006-06-07 18:20:22 CEST

On Jun 6, 2006, at 21:48, Javier Ruiz wrote:

> We use subversion extensively in our projects and thus far we've
> been very successful. However, every now and then it seems that
> subversion isn't updating files correctly; but I haven't been able
> to find evidence to this effect. This feeling, however, sometimes
> reduces the confidence of developers in the merge process.
>
> In order to be proactive and address their questions about how the
> merge works I've been searching for the details on how it merges
> two files (say Java or Javascript files) but haven't been able to
> find this information. Does anyone know where I can find these
> details?

A merge is nothing more than diff and patch.

Let's say you were going to merge a change from revision 42 of a
branch into a working copy of the trunk:

$ cd trunk
$ svn merge -r41:42 $REPO/project1/branches/branch1 .

All Subversion is doing is getting a diff between revision 41 and 42
of the branch and applying it to the working copy. You can see this
diff yourself now after the merge by using:

$ svn diff

To show you that this is in fact the same as the diff between those
revisions in the repository, you can do the diff there:

$ svn diff -r41:42 $REPO/project1/branches/branch1

Do note that although these text representations of diffs don't show
some changes, like additions or deletions of directories, or maybe
some properties, or the contents of binary files, Subversion does of
course make use of all that information when you use svn merge.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Jun 7 18:43:32 2006

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

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