[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: Stephen Butler <sbutler_at_elego.de>
Date: 2007-12-10 22:06:55 CET

Quoting Gus Hart <gus.hart@gmail.com>:

> 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.

True, if programmers don't communicate, they will cause subtle
problems for each other. ;)

The bugs that arise due to automatic merging can also be introduced by
manual merging. In my experience, the auto merge in 'svn update'
saves time that you can spend looking for the subtle problems.

>
> That brings another question. Is there any documentation that
> describes, in detail, *how* subversion does the merging? How it
> decides it is innocuous?

 From the SVN Book (free online at http://svnbook.red-bean.com/):

   Subversion expresses file differences using a binary differencing
   algorithm, which works identically on both text (human-readable)
   and binary (human-unreadable) files.

Most diff tools, including Subversion's, display text file differences
line-by-line. More details on Subversion's merge algorithm are at
http://subversion.tigris.org/variance-adjusted-patching.html.

As far as ensuring only innocuous changes, only humans can do it (with
a little help from compilers, IDEs, and other tools).

Regards,
Steve

-- 
Stephen Butler | Software Developer
elego Software Solutions GmbH
Gustav-Meyer-Allee 25 | 13355 Berlin | Germany
fon: +49 30 2345 8696 | mobile: +49 163 25 45 015
fax: +49 30 2345 8695 | http://www.elegosoft.com
Geschäftsführer: Olaf Wagner | Sitz der Gesellschaft: Berlin
Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Dec 10 22:07:35 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.