Can I turn off automatic merging in Subversion?

后端 未结 5 886
不思量自难忘°
不思量自难忘° 2021-02-07 04:37

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 ac

相关标签:
5条回答
  • 2021-02-07 05:01

    It's in the FAQ: How can I prevent Subversion from doing automatic merges?

    1. In TortoiseSVN->Settings->General->Subversion configuration file, click on the edit button.
    2. Change the [helpers] section by adding

        diff-cmd = "C:\\false.bat"
      

      (note the double backslash)

    3. Create the file C:\false.bat which contains two lines

        @type %9
        @exit 1
      
    0 讨论(0)
  • 2021-02-07 05:07

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

    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.

    If you are concerned about about a particular change you are making Subversion does provide a locking mechanism to let you prevent other changes to the file. See the Red Book chapters on locking.

    0 讨论(0)
  • 2021-02-07 05:12

    The best way around this is to educate the developers. After 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.

    0 讨论(0)
  • 2021-02-07 05:16

    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.

    0 讨论(0)
  • 2021-02-07 05:22

    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.

    Remember what Subversion is: a version control system, not a perfectly-working-code-merging-tool.

    0 讨论(0)
提交回复
热议问题