svn: using vim to merge conflicts

I am trying see how merging in svn can be made easy.

This page mentions that external tools can be used for merging.
Can vim be used as the external merge tool?

  • Calling SVN commands from a java program
  • svn or git or something else?
  • Is there anyway to get TortoiseSVN to leave EOL (line endings) as is?
  • How do you remove a file from being version controlled without deleting the file in subversion?
  • SmartGit: File or Directory out of date error message when it is not?
  • Folder structure for many projects in one SVN repository?
  • Some additional requirements:

    1. Files should be split horizontally/vertically to give a better view.
    2. Window titles should be set appropriately.

    e.g: as in
    enter image description here

  • Transferring from SVN to GIT, merge workflow changes from SVN to GIT with shared repositories
  • Xcode source control view history modified files fail
  • Should we ignore Solution Output folder while we are using Visual Studio and Version Control?
  • Do you keep your build tools in version control?
  • Why should I use version control?
  • Associating existing Eclipse project with existing SVN repository
  • One Solution collect form web for “svn: using vim to merge conflicts”

    Step 1:

    Save the following script, e.g:

    vimdiff $MINE $THEIRS -c ":botright split $MERGED" -c ":diffthis" -c "setl statusline=MERGED | wincmd W | setl statusline=THEIRS | wincmd W | setl statusline=MINE"

    Step 2:

    Edit .subversion/config and add following line:

    merge-tool-cmd = /path/to/

    Step 3:

    When you get following options during svn merge command, select option ‘l‘.
    This is to launch external tool to resolve conflicts.

    Conflict discovered in 'main.h'.
    Select: (p) postpone, (df) diff-full, (e) edit,
            (mc) mine-conflict, (tc) theirs-conflict,
            (s) show all options: l

    Step 4:
    Now vim will be opened in diff mode with 3 files – mine, theirs and merged.
    Make the required changes in the merged file, and do save and exit (:wqa).

    Step 5:

    Now below options will appear again, select ‘r‘ (to accept the merged version) now.

    Select: (p) postpone, (df) diff-full, (e) edit,
                (mc) mine-conflict, (tc) theirs-conflict,
                (s) show all options: r
    Git Baby is a git and github fan, let's start git clone.