使用Beyond Compare在linux下进行svn diff 和 svn merge.(更新 基于centos)

原文地址:http://www.scootersoftware.com/support.php?zz=kb_vcs#svn

beyond compare下载:http://www.scootersoftware.com/download.php

Diff:

创建文件命名为 "/usr/bin/bcdiff.sh".

bcdiff.sh

#!/bin/bash
/usr/bin/bcompare "$6" "$7" -title1="$3" -title2="$5"
exit 0

编辑"$HOME/.subversion/config" 并且加入 "diff-cmd = /usr/bin/bcdiff.sh".

chmod 755 /usr/bin/bcdiff.sh

Merge:

创建文件命名为 "/usr/bin/bcmerge.sh".

bcmerge.sh

#!/bin/bash
/usr/bin/bcompare "$2" "$3" "$1" "$4"
exit 0

编辑"$HOME/.subversion/config" 并且加入 "merge-tool-cmd = /usr/bin/bcmerge.sh".

chmod 755 /usr/bin/bcmerge.sh

 

 

Using Beyond Compare with Version Control Systems

 

Subversion

Windows

Diff

  1. Go into the Beyond Compare installation folder (eg, C:\Program Files\Beyond Compare 3).
  2. Create a batch file named "bc3svn.bat" with one line:
      "C:\Progra~1\Beyond~1\bcomp.exe" "%6" /title1=%3 "%7" /title2=%5
  3. Go into Subversion's per-user configuration area, typically C:\Documents and Settings\<username>\Application Data\Subversion.
  4. Edit "config" and change the following lines:
      # [helpers]
      # diff-cmd = diff_program (diff, gdiff, etc.)
    to:
      [helpers]
      diff-cmd = C:\Progra~1\Beyond~1\bc3svn.bat

Merge (v3 Pro)

  1. Go into the Beyond Compare installation folder (eg, C:\Program Files\Beyond Compare 3).
  2. Create a batch file named "bc3mer.bat" with one line:
      "C:\Progra~1\Beyond~1\bcomp.exe" "%2" "%3" "%1" "%4"
  3. Go into Subversion's per-user configuration area, typically C:\Documents and Settings\<username>\Application Data\Subversion.
  4. Edit "config" and change the following lines:
      # [helpers]
      # merge-tool-cmd = merge_program
    to:
      [helpers]
      merge-tool-cmd = C:\Progra~1\Beyond~1\bc3mer.bat

Cygwin (http://www.cygwin.com/)

Instead of using a batch file, create a file named "bc.sh" with the following line:
"$(cygpath 'C:\Progra~1\Beyond~1\bcomp.exe')" `cygpath -w "$6"` `cygpath -w "$7"` /title1="$3" /title2="$5" /readonly

Linux

Diff:

Create a file named /usr/bin/bcdiff.sh with the following line:
/usr/bin/bcompare "$6" "$7" -title1="$3" -title2="\"$5\"" -readonly
exit 0

Edit "$HOME/.subversion/config" and add the line "diff-cmd = /usr/bin/bcdiff.sh".

Merge:

Create a file named /usr/bin/bcmerge.sh with the following line:
/usr/bin/bcompare "$2" "$3" "$1" "$4"

Edit "$HOME/.subversion/config" and add the line "merge-tool-cmd = /usr/bin/bcmerge.sh".

posted on 2012-05-16 09:30  longzhao&&dilanlx  阅读(3876)  评论(0编辑  收藏  举报

导航