Mac OS X 配置 Beyond Compare

转载地址:点击打开链接


Using Beyond Compare with Version Control Systems under OS X

Mac logo Mac OS X Only

Beyond Compare can be configured as the external difference utility in many popular VCS applications.  The following are configuration instructions submitted by our users.  Let us know if you have one to add to the list.

Index:
Cornerstone SVN  Git  IntelliJ IDEA 12  Mercurial 2.4.2  Perforce  SmartCVS  SourceTree  Subversion  Syncovery Mac  Tower (Git) 


CORNERSTONE SVN

In Cornerstone, you can specify a custom external compare script.

Launch Beyond Compare, go to the Beyond Compare menu and run Install Command Line Tools.

DIFF
Create an AppleScript wrapper for use by Cornerstone:
-- Cornerstone executes the script as:
-- /path/to/tool <original> <modified>
--
on run argv
    do shell script "/usr/local/bin/bcomp \"" & item 1 of argv & "\" \"" & item 2 of argv & "\""
end run

Set in Preferences | General | External compare tool | Other Script...


GIT

Git 2.3 and newer

(Note:  Use bc3 on the command line for BC version 4. Caused by git legacy support from Linux.)

Launch Beyond Compare, go to the Beyond Compare menu and run Install Command Line Tools.

Diff
In a terminal:
git config --global diff.tool bc3

To launch a diff using Beyond Compare, use the command:  git difftool file.ext

Merge Pro only
In a terminal:
git config --global merge.tool bc3
git config --global mergetool.bc3 trustExitCode true

To launch a 3-way merge using Beyond Compare, use the command:  git mergetool file.ext


Older versions of Git

  1. Launch Beyond Compare, go to the Beyond Compare menu and run Install Command Line Tools.
  2. Add the following lines to $HOME/.gitconfig:
    [diff]
      tool = bcomp
    [difftool]
      prompt = false
    [difftool "bcomp"]
      trustExitCode = true
      cmd = "/usr/local/bin/bcomp" \"$LOCAL\" \"$REMOTE\"
    [merge]
      tool = bcomp
    [mergetool]
      prompt = false
    [mergetool "bcomp"]
      trustExitCode = true
      cmd = "/usr/local/bin/bcomp" \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\"
  3. To launch a diff in Beyond Compare, use:  git difftool file.ext
    To launch a merge in Beyond Compare, use:  git mergetool file.ext

INTELLIJ IDEA

(Potentially, also RubyMine, Webstorm, PyCharm, PhpStorm)

The first step is to launch Beyond Compare, go to the Beyond Compare menu and run Install Command Line Tools.

In IntelliJ's Settings dialog, under IDE Settings, select the External Diff Tools section:

Compare folders
Path to executable: /usr/local/bin/bcomp

Compare files
Path to executable: /usr/local/bin/bcomp

Merge tool
Path to executable: /usr/local/bin/bcomp
Parameters: %1 %2 %3 %4

MERCURIAL 2.4.2

Launch Beyond Compare, go to the Beyond Compare menu and run Install Command Line Tools.

[ui]
merge = bcomp

[extensions]
extdiff =

[extdiff]
cmd.bcomp = /usr/local/bin/bcomp
#opts.bcomp = -ro

[merge-tools]
bcomp.executable = /usr/local/bin/bcomp
bcomp.args = $local $other $base $output
bcomp.priority = 1
bcomp.premerge = True
bcomp.gui = True

PERFORCE

Launch Beyond Compare, go to the Beyond Compare menu and run Install Command Line Tools.

Diff

  1. Go to the P4V menu and select Preferences.
  2. Go to the Diff section and select Other application.
  3. Location/usr/local/bin/bcomp
  4. Arguments%1 %2

Merge

  1. Go to the P4V menu and select Preferences.
  2. Go to the Merge section and select Other application.
  3. Location/usr/local/bin/bcomp
  4. Arguments%1 %2 %b %r

SMARTCVS

  1. Launch Beyond Compare, go to the Beyond Compare menu and run Install Command Line Tools.
  2. Launch SmartCVS, select Preferences | File Comparators.
  3. Select * in the table and click edit.
  4. Add /usr/local/bin/bcomp in Command and ${leftFile} ${rightFile} in Arguments.
  5. Click OK.

SOURCETREE

From the Beyond Compare menu, Install Command Line Tools.  Then:

Visual Diff Tool: Other
Diff Command:/usr/local/bin/bcomp
Parameters:-ro $LOCAL $REMOTE
Merge Tool: Other
Merge Command:/usr/local/bin/bcomp
Parameters:$LOCAL $REMOTE $BASE $MERGED

SUBVERSION

Launch Beyond Compare, go to the Beyond Compare menu and run Install Command Line Tools.

Diff

Create a file named /usr/local/bin/bcdiff.sh and allow execute permissions (chmod +x).  Add the following lines:
/usr/local/bin/bcomp "$6" "$7" -title1="$3" -title2="$5" -readonly
exit 0

Edit $HOME/.subversion/config and add the line diff-cmd = /usr/local/bin/bcdiff.sh in [Helpers].

Merge

Create a file named /usr/local/bin/bcmerge.sh and allow execute permissions (chmod +x).  Add the following line:
/usr/local/bin/bcomp "$2" "$3" "$1" "$4"

Edit $HOME/.subversion/config and add the line merge-tool-cmd = /usr/local/bin/bcmerge.sh in [Helpers].


SYNCOVERY MAC

The first step is to launch Beyond Compare, go to the Beyond Compare menu and run Install Command Line Tools.

Then to configure Syncovery:

  1. Select menu Syncovery/Preferences.
  2. Click the Misc tab.
  3. In the field Program used to compare files from the Sync Preview, write /usr/local/bin/bcompare (or the pathname given when using BC4's Install Command Line Tools).
  4. Click Close.

TOWER (GIT)

(Requires Tower 2.0.5 or newer)
  1. Launch Beyond Compare, go to the Beyond Compare menu and run Install Command Line Tools.
  2. Open Tower's preferences dialog on the Git Config Tab.
  3. Set the Diff Tool drop-down to Beyond Compare.
  4. Set the Merge tool drop-down to Beyond Compare.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Compare Folder是一个功能强大、简单易用的文件夹对比/更新/移除(compare/sync/move)工具,不仅支持本地文件夹,FTP 虚拟文件夹,支持批任务处理,还支持文本文件的内容差异比较。它可以对比两个文件夹的文件名称、修改时间、文件大小、属性等,让你在备份和文件整理工作中倍觉轻松。目前最新的稳定版为3.3。 工作机制:首先按指定的参数生成一份差异清单,然后按照差异清单,实现两文件夹的更新同步。 解压后即可使用,绝对绿色软件,不需要时删除文件夹即可。 普通用户使用非注册版即可。如果朋友们想用那些专家功能,请先申请免费注册。付费注册,终身享受同版本升级! 心情故事: 我的工作总是把文件改来改去、备来备去的,又怕弄错又很繁琐。老公就给我了这个小工具,工作一下子就轻松多了。我和几个老友用了6年多了,在漫长的实际使用中,已经把老友们的需求都一步步解决了。例如:本地文件和远程文件同步/文本文件(源代码)内容比较等。实践证明这个小工具好用又稳定。这个工具,还改变了我的工作习惯。我会把自己的重要文件夹在硬盘另一个位置保存一份。每周找个时间用一下工具,知道哪些变化了,然后做个增量备份。万一电脑硬件故障或者中了病毒,也不会把有用的文件给毁啦! 这个长假逼着懒虫同志写了份说明书,放到共享网给更多的朋友使用。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值