使用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".


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM