<p>We're looking at moving from a check-out/edit/check-in style of version control system to Subversion, and during the evaluation we discovered that when you perform an Update action in TortoiseSVN (and presumably in any Subversion client?), if changes in the repository that need to be applied to files that you've been editing don't cause any conflicts then they'll be automatically/silently merged.</p>

<p>This scares us a little, as it's possible that this merge, while not producing any compile errors, could at least introduce some logic errors that may not be easily detected.</p>

<p>Very simple example: I'm working within a C# method changing some logic in the latter-part of the method, and somebody else changes the value that a variable gets initialised to at the start of the method. The other person's change isn't in the lines of code that I'm working on so there won't be a conflict; but it's possible to dramatically change the output of the method.</p>

<p>What we were hoping the situation would be is that if a merge needs to occur, then the two files would be shown and at least a simple accept/reject change option be presented, so that at least we're aware that something has changed and are given the option to see if it impacts our code.</p>

<p>Is there a way to do this with Subversion/TortoiseSVN?  Or are we stuck in our present working ways too much and should just let it do it's thing...</p>

[{'answer_id': 53812, 'author': 'aku', 'author_id': 1196, 'author_profile': 'https://Stackoverflow.com/users/1196', 'pm_score': 3, 'selected': False, 'text': '<p>Here is a trick for TortoiseSVN:</p>\n\n<p><a href="http://www.blendedtechnologies.com/how-to-turn-off-auto-merge-in-subversion/33" rel="nofollow noreferrer">How to turn off “auto-merge” in Subversion</a></p>\n\n<p>Trick for svn.exe is to set svn external diff tool to a program that will constantly fail.</p>\n\n<pre><code>svn --diff-cmd=/bin/false\n</code></pre>\n\n<p>If external diff program fails, svn concludes that conflict is unresolvable and wouldn\'t merge it.</p>\n'}, {'answer_id': 53846, 'author': 'Mark Ingram', 'author_id': 986, 'author_profile': 'https://Stackoverflow.com/users/986', 'pm_score': 4, 'selected': True, 'text': "<p>The best way around this is to educate the developers.\nAfter you do an update in TortoiseSVN it shows you a list of affected files. Simply double clicking each file will give you the diff between them. Then you'll be able to see what changed between your version and the latest repository version.</p>\n"}, {'answer_id': 53859, 'author': 'Rob Walker', 'author_id': 3631, 'author_profile': 'https://Stackoverflow.com/users/3631', 'pm_score': 1, 'selected': False, 'text': '<p>I would suggest you should learn to work with the natural Subversion model if at all possible.  In practice we find conflicts are rare, and the type of logic conflict you talk about almost non-existent (I can\'t recall an instance in the last 4 years in our repository).</p>\n\n<p>Team members should check-in changes on as small a scale as possible (whilst maintaining correctness) rather than batching up a whole days work to just check it in once.  This will reduce the possibility of stepping on someone else\'s work.</p>\n\n<p>If you are concerned about about a particular change you are making Subversion does provide a <strong>locking</strong> mechanism to let you prevent other changes to the file.  See the <a href="http://svnbook.red-bean.com/en/1.2/" rel="nofollow noreferrer">Red Book</a> chapters on <a href="http://svnbook.red-bean.com/en/1.2/svn.advanced.locking.html" rel="nofollow noreferrer">locking</a>.</p>\n'}, {'answer_id': 7673033, 'author': 'Nordic Mainframe', 'author_id': 385433, 'author_profile': 'https://Stackoverflow.com/users/385433', 'pm_score': 4, 'selected': False, 'text': '<p>It\'s in the FAQ: \n<a href="http://tortoisesvn.tigris.org/faq.html#noautomerge" rel="noreferrer">How can I  prevent Subversion from doing automatic merges?</a></p>\n\n<blockquote>\n  <ol>\n  <li>In TortoiseSVN->Settings->General->Subversion configuration file, click on the edit button.</li>\n  <li><p>Change the <code>[helpers]</code> section by adding</p>\n\n<pre><code>  diff-cmd = "C:\\\\false.bat"\n</code></pre>\n  \n  <p>(note the double backslash)</p></li>\n  <li><p>Create the file C:\\false.bat which contains two lines</p>\n\n<pre><code>  @type %9\n  @exit 1\n</code></pre></li>\n  </ol>\n</blockquote>\n'}, {'answer_id': 16592505, 'author': 'APWorsley', 'author_id': 1668285, 'author_profile': 'https://Stackoverflow.com/users/1668285', 'pm_score': 0, 'selected': False, 'text': '<p>This is why automated (unit) testing is a fundamental part of distributed software development. In the example you give, at least one unit test should fail on svn update and alert you to the error.</p>\n\n<p>Remember what Subversion is: a version control system, not a perfectly-working-code-merging-tool.</p>\n'}]
['https://Stackoverflow.com/questions/53803', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/5517/']