Is it possible to replace TortoiseSVN's merge algorithm with a "better" one?
Asked Answered
C

2

7

Using the merge functionality in SVN (through TortoiseSVN) since a few month, I have the feeling that SVN reports way too often that a conflict occurs.

So I am looking for a way to make (Tortoise)SVN more often resolve conflicts automatically without my user-interaction.

I'm aware of similar questions and the fact that you can replace the diff viewer and merge tool with external ones:

enter image description here

From my understanding these tools chain-in too late; they are getting called by SVN/TortoiseSVN when the internal algorithm already detected an unresovable conflict.

So my questions are:

  • Is my assumption of the behaviour (internal merge algorithm, external merge tools) correct?
  • Is there a way to improve the internal merge algorithm by (e.g. paid) tools?

(I'm using VisualSVN Server and V1.7 repositories, in case that matters)

Cakewalk answered 22/5, 2013 at 10:55 Comment(2)
you are not going to like my suggestion, but the only way to improve svn merge algorithm is to use git insteadDimeter
@Dimeter Yeah, probably correct ;-)Cakewalk
C
1

Firstly, its nothing to do with Tortoise - that's just an extremely nice GUI on top of the SVN system.

Now, maybe you have lots of merges that actually need human attention. If so, moving to something like git or Mercurial will not help you one bit - neither of those can tell what you really meant, just like SVN cannot tell.

You can check out the way SVN does its merge algorithm, by reading the documentation. FYI v1.8 has a few tweaks to it that should mean there's much less manual decision making when doing reintegration merges - it just does it automatically now, so if you've been doing the special feature-branch style merges and have been doing it wrong, then it won't complain anymore. They've been working on merging for the last 2 versions now, improving it continually not only with the mergeinfo, but with features like move so it can tell a file isn't new or deleted so reducing any tree conflict type merges.

Chausses answered 6/7, 2013 at 17:34 Comment(0)
H
1

It's difficult to speculate on the context, but conflicts being found is unlikely to have anything to do with TortoiseSVN in particular and more to do with just svn in general. As mvp says, git would be better (heh) but have you looked at the --reintegrate flag for merge? Not sure how you could use it from TortoiseSVN directly, but it's proved very useful for me in reducing conflicts.

Edit View the 'advanced merging' tutorial here

Hazan answered 6/7, 2013 at 16:45 Comment(2)
Thanks! In the meantime we are on SVN 1.8 both server and clients, seems they did quite a lot to simplify merging. I'll wait and see how this behaves in future merges...Cakewalk
Yes, that's definitely another thing, newer SVN revisions seem to cope better with merges in general (particularly merginfo's I find), and only having one .svn file is a bonus :)Hazan
C
1

Firstly, its nothing to do with Tortoise - that's just an extremely nice GUI on top of the SVN system.

Now, maybe you have lots of merges that actually need human attention. If so, moving to something like git or Mercurial will not help you one bit - neither of those can tell what you really meant, just like SVN cannot tell.

You can check out the way SVN does its merge algorithm, by reading the documentation. FYI v1.8 has a few tweaks to it that should mean there's much less manual decision making when doing reintegration merges - it just does it automatically now, so if you've been doing the special feature-branch style merges and have been doing it wrong, then it won't complain anymore. They've been working on merging for the last 2 versions now, improving it continually not only with the mergeinfo, but with features like move so it can tell a file isn't new or deleted so reducing any tree conflict type merges.

Chausses answered 6/7, 2013 at 17:34 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.