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.
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.
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.
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.
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...
This basic syntax— svn merge URL —tells Subversion to merge all changes which have not been previously merged from the URL to the current working directory (which is typically the root of your working copy).
To merge a range of revisions, use svn merge -r start:end from to where start and end are revision IDs. This will merge all revisions starting at start+1 up to and INCLUDING end . Note: it will NOT include the first revision (ex: -r3:45 will merge 4 through 45).
It's in the FAQ: How can I prevent Subversion from doing automatic merges?
- In TortoiseSVN->Settings->General->Subversion configuration file, click on the edit button.
Change the
[helpers]
section by addingdiff-cmd = "C:\\false.bat"
(note the double backslash)
Create the file C:\false.bat which contains two lines
@type %9 @exit 1
Here is a trick for TortoiseSVN:
How to turn off “auto-merge” in Subversion
Trick for svn.exe is to set svn external diff tool to a program that will constantly fail.
svn --diff-cmd=/bin/false
If external diff program fails, svn concludes that conflict is unresolvable and wouldn't merge it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With