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

Re: How to disable automatic merging...

From: Hari Kodungallur <hkodungallur_at_gmail.com>
Date: 2007-12-10 22:10:13 CET

On Dec 10, 2007 12:33 PM, Gus Hart <gus.hart@gmail.com> wrote:

> Here's an example why I might not want auto-merging (BTW, no one
> answered my question, only questioned my premise...).
>
> Suppose I remove a declared but unused variable. At the same time my
> collaborator decides to use said variable a hundred lines below. We
> both commit. SVN merges when I update---the changes seem unrelated
> (different place in the file) so SVN merges. Now I have an undeclared
> variable that is actually being used. At best, I'll discover at next
> compile. But this is a simple example. It's not hard to imagine
> scenarios where the bug introduced might be really subtle.
>
> That brings another question. Is there any documentation that
> describes, in detail, *how* subversion does the merging? How it
> decides it is innocuous?
>
> It's hard to believe that SVN is smart enough to "know" that two
> changes in the same file by different people but in different places
> don't intersect.

I don't think Subversion invented this. Subversion just implements the well
known diff3 algorithm for automatic merges.

And I think the answer to your original question is that there is no way to
disable the feature. This is a basical functionality that every good Version
Control System provides.

As Sohail suggested, the solution for you will be to work in your own branch
where other people do not do any updates.

And finally, I hope whatever situation you are in, it is an exception case
for you to not want to merge others' changes. If not, please do start using
it. It is much more useful than you think.

Regards,
-Hari
Received on Mon Dec 10 22:11:01 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.