Ubuntu (Linux) SVN (1.7) using the KDIFF3 merge trunk

Source: Internet
Author: User
Tags diff tortoisesvn

Reason: The small turtle (TortoiseSVN) cannot be used under Linux, idea cannot use the SVN merge skeleton code below, in order to solve each merge code to start the virtual machine, and can be as convenient as the small turtle (TortoiseSVN).


1, install KDIFF3. Cross-system and compare popular code diff tools.

sudo apt-get install KDIFF3

2. Install SVN tools.

1) sudo apt-get install subversion subversion-tools

2) downgrade Install SVN (1.7), reference: kubuntu/ubuntu 14.04 (downgrade) Install SVN 1.7

3. Configuration script.

1) Download Svndiffwrapper.txt . http://download.csdn.net/detail/love254443233/7941913

2) Copy: sudo cp svndiffwrapper.txt/usr/bin/svndiffwrapper

3) Set the operational permissions. sudo chmod a+x/usr/bin/svndiffwrapper

4. Modify SVN configuration information

1) Open config file: Vim ~/.subversion/config

2) Modify the Diff tool and Merge-tool-cmd tool configuration

# # # Set Diff-cmd to the absolute path of your ' diff ' program.### this would   override the Compile-time default, which is To use###   Subversion ' s internal diff implementation.# Diff-cmd = Diff_program (diff, Gdiff, etc.) Diff-cmd = svndiffwrapper### Set diff3-cmd to the absolute path of your ' DIFF3 ' program.### this would   override the COM Pile-time default, which is to use###   Subversion ' s internal diff3 implementation.# diff3-cmd = Diff3_program (DIFF3, G DIFF3, etc.) Diff3-cmd = svndiffwrapper### Set diff3-has-program-arg to ' yes ' if your ' diff3 ' program###   accepts the '--diff-progra M ' option.# diff3-has-program-arg = [yes | no]### Set merge-tool-cmd to the command used to invoke your external### Mergin G tool of choice. Subversion would pass 4 arguments to### the specified command:base theirs mine merged# merge-tool-cmd = Merge_commandmerge -tool-cmd =kdiff3 "$" "$" "$"-O "$4"
5, the merge trunk.

1) The command line enters the working directory of the local branch, such as/home/xx/work/svn/xx-hotel-image

Submit Branch (safekeeping). svn commit-m "merge trunk"

2) Copy trunk (trunk) URL, such as Http://svn.xx.xx.com/svn/xx/xx/xx-api/trunk

3) Merge code ("." In the last side) Can be omitted as the Operation 1th).

SVN merge Http://svn.corp.qunar.com/svn/mobile/mobfx/hms-api/trunk.

4) When you encounter a conflict during the run, you will be prompted to choose (M) Erge into the KDIFF3 interface, which is roughly the same as using the small turtle (TortoiseSVN) below Windows.


1. Interface Operation method

1) The first column is the new version file for the branch. The second column is the file that the branch is developing. The third column is the trunk file. The following column is a file (output) that is exported after comparison.

2) The output file can be edited and can be artificially modified when the merge is not met.

2. SVN merge Other common commands

1) Merge trunk to local branch: SVN merge http://svn.xx.xx.com/svn/xx/xx/xx-api/trunk .
2) When the merge error occurs, use the fallback operation:

SVN revert-cancels all local edits. To recover an entire directory of files, you can use the--depth=infinity option:
Svn revert--depth=infinity.

3) Submit local modifications to the server:

SVN commit-m "Merge trunk"

4) encountered the following error:

SVN:E155015: Commit failed (details below):
SVN:E155015: Commit terminated: "/home/xx/work/svn/xx-hotel-image/versions.mapping" in Conflict state

Workaround: SVN resolved /home/xx/work/svn/xx-hotel-image/versions.mapping

5) wait for suggestions.

Ubuntu (Linux) SVN (1.7) using the KDIFF3 merge trunk

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.