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

Re: Two people adding the same file - can both versions be merged?

From: Dave Lawrence <dlawrence_at_ad-holdings.co.uk>
Date: 2007-05-09 14:45:13 CEST

You can't merge two files with, what to Subversion is a non existent
ancestor file. Consider the following

developer1 and developer2 both check out rev1 of the file. Both make
changes, and developer1 commits first, creating rev2. Now developer 2
has to do an update before he/she can commit - subversion will attempt a
merge as follows:

1) Take the changes between rev1 and rev2
2) Take the changes between rev1 and developer2's working copy
3) Merge them

Easy to do if developer1 and developer2 were editing different parts of
the file.

Now the situation you are describing is that effectively there is a
rev0, where the file didn't exist. How could SVN know which were
developer1's "changes" and which were developer2's, from it's
perspective you have both created different versions of the file from
out of nowhere.

The only merge algorithm that can be applied is that one version
replaces the other, and how does SVN know what you want to do? The
answer is that it doesn't and therefore you have to fix it up manually.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed May 9 15:03:57 2007

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.