您的位置:首页 > 运维架构 > Linux

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

2012-05-16 09:30 218 查看
原文地址: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

Go into the Beyond Compare installation folder (eg, C:\Program Files\Beyond Compare 3).

Create a batch file named "bc3svn.bat" with one line:

"C:\Progra~1\Beyond~1\bcomp.exe" "%6" /title1=%3 "%7" /title2=%5


Go into Subversion's per-user configuration area, typically
C:\Documents and Settings\<username>\Application Data\Subversion.

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)

Go into the Beyond Compare installation folder (eg, C:\Program Files\Beyond Compare 3).

Create a batch file named "bc3mer.bat" with one line:

"C:\Progra~1\Beyond~1\bcomp.exe" "%2" "%3" "%1" "%4"


Go into Subversion's per-user configuration area, typically
C:\Documents and Settings\<username>\Application Data\Subversion.

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".
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: