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

RE: Re: Subversion merge conflicts (part 2)

From: Gleason, Todd <tgleason_at_impac.com>
Date: Wed, 2 Jul 2008 14:16:19 -0700

> -----Original Message-----
> From: Stefan Kng [mailto:tortoisesvn_at_gmail.com]
> Sent: Tuesday, July 01, 2008 10:01 AM
> To: users_at_tortoisesvn.tigris.org
> Subject: Re: Subversion merge conflicts (part 2)
> Gleason, Todd wrote:
> > I see that the main question on the "SVN Merge Conflicts Issue" thread
> > is resolved, but I have a related question about conflict detection.
> > For me, it's not an EOL issue but a tabs vs. spaces one.
> >
> >
> >
> > Looking at http://subversion.tigris.org/svn_1.4_releasenotes.html I see:
> >
> >
> >
> > svn diff -x [-u | -b | -w | --ignore-eol-style]
> >
> >
> >
> > You can make the internal svn diff ignore whitespace, according to this.
> > Does this apply in terms of conflict detection? If so, how do you
> > configure Tortoise and/or the command line client to ignore whitespace
> > in a diff? Note that users might want to swap between clients and would
> > expect no problems.
> You can only ignore whitespaces in a diff. But you can't ignore them
> when updating or merging. After all, you want your working copy to
> reflect the state of your repository, otherwise you couldn't commit.
> You should set the svn:eol-style property on your files to avoid such
> problems.

Is there any way in which you can set svn:eol-style such that it ignores tabs vs. spaces kind of whitespace, or are you (as I expect) just referring to CRLF conversion?

> > And whose whitespace is used when you ignore whitespace? Is it a
> > combination of "mine" and "theirs"?
> The whitespaces of 'theirs', but from 'mine' if 'mine' has lines which
> 'theirs' doesn't.
> > Or do you need to mandate tabs or spaces for everything to work
> smoothly?
> Of course: how should Subversion/TSVN know that you don't care about
> whether a space is there or a tab? There are programming languages where
> that makes a *big* difference. So Subversion *has* to treat those
> differences as real differences and can't just ignore those.
> It *can* ignore those for *showing* you a diff, but that's all.

Thanks very much for the information. Unfortunately I have to press a bit further. In mentioning this to co-workers, the response I'm getting back is that it is hard to believe this is not configurable such that you could prevent conflicts, and that we should spend some time to be sure.

Also, the point that there are a few languages (out of hundreds) that are sensitive to tabs vs. spaces is something they find surprising. Consider that for those languages, you would not be using an editor that made it easy to swap between tabs and spaces. Therefore you would not be exposed to this issue except for languages where it isn't an issue of correctness.

So I have to ask if there is more documentation you can point me at that supports your statements that it is impossible to configure Subversion to ignore tabs vs. spaces kind of whitespace when doing updates and merges, and that you will get "bogus" conflicts in these cases.

To unsubscribe, e-mail: users-unsubscribe_at_tortoisesvn.tigris.org
For additional commands, e-mail: users-help_at_tortoisesvn.tigris.org
Received on 2008-07-02 23:17:02 CEST

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

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