简体   繁体   English

在 Eclipse 中使用 Beyond Compare 在 Subversion 中进行合并

[英]Using Beyond Compare inside Eclipse for Merging in Subversion

I would like to use Beyond Compare inside Eclipse.我想在 Eclipse 中使用 Beyond Compare。 The problem at hand is, that the native diff and merge tool does not allow to customize the diff enough, so there are too much differences.手头的问题是,本机差异和合并工具不允许足够自定义差异,因此差异太大。 Beyond Compare has the right customization for that, but I could not integrate the tool. Beyond Compare 对此进行了正确的自定义,但我无法集成该工具。 I have tried the following:我尝试了以下方法:

  1. Use the Eclipse Plugin http://beyondcvs.sourceforge.net/ But I could not configure Subversive inside Eclipse to use that plugin, and the plugin does not integrate itself into the merge action of Subversive.使用 Eclipse 插件http://beyondcvs.sourceforge.net/但我无法在 Eclipse 中配置 Subversive,并且插件不会将自身集成到 Subversive 的合并中以使用该插件的合并。
  2. Tried to integrate Beyond Compare as the diff viewer (see Eclipse Window > Preferences > Team > SVN > Diff Viewer).尝试将 Beyond Compare 集成为差异查看器(请参阅 Eclipse Window > Preferences > Team > SVN > Diff Viewer)。 When doing then a synchronize, the diff viewer I configured was not used at all.然后进行同步时,我配置的差异查看器根本没有使用。 I followed the information found at http://www.scootersoftware.com/download.php?c=kb_vcs under the point "tortoisesvn" and changed the syntax as needed by the Subversive plugin.我按照在“tortoisesvn”点下的http://www.scootersoftware.com/download.php?c=kb_vcs找到的信息,并根据需要更改了 Subversive 插件的语法。

Has anyone succeeded in integrating Beyond Compare in Eclipse for Subversion?有没有人成功地将 Beyond Compare 集成到 Eclipse 中用于 Subversion? I have found the similar question How to configure Beyond Compare 3 for Eclipse conflict resolution?我发现了类似的问题How to configure Beyond Compare 3 for Eclipse 冲突解决? , but it did not work for me (perhaps the difference between Subversive and Subclipse?). ,但它对我不起作用(也许是 Subversive 和 Subclipse 之间的区别?)。


Addition: I followed the steps of @Tom Clift (thank's a lot), and the diff is now working, the merge was a little bit more difficult.另外:我按照@Tom Clift 的步骤(非常感谢),现在差异正在工作,合并有点困难。 I have done the following steps to final success:我已完成以下步骤以取得最终成功:

  1. Configured as documented by the answer.配置为由答案记录。
  2. Changed something on a branch and commited that.更改了分支上的某些内容并提交了该内容。
  3. Switched to the trunk.切换到后备箱。
  4. Started there the merge operation: Team > Merge... > Tab URL > URL Field: <branch URL> and Radio button "Start from copy"从那里开始合并操作: Team > Merge... > Tab URL > URL Field: <branch URL> and Radio button "Start from copy"
  5. When pressing Ok , a dialog pops up that ask if it is ok to open the "Synchronize View".按下Ok时,会弹出一个对话框,询问是否可以打开“同步视图”。
  6. The synchronize perspecitve shows all changes, and when I select one, there is a menu entry "Open in external compare editor" that opens Beyond Compare.同步透视图显示所有更改,当我 select 之一时,有一个菜单项“在外部比较编辑器中打开”打开了 Beyond Compare。

Steps for configuring Eclipse (tested with 3.7 (Indigo) through 4.4 (Luna)) with Subversive to use Beyond Compare as the default diff and merge tool (may work with other versions too):使用Subversive配置 Eclipse(使用 3.7 (Indigo) 到 4.4 (Luna) 测试)以使用Beyond Compare作为默认差异和合并工具的步骤(也可以与其他版本一起使用):

Note: per MattPassell's comment there seems to be an outstanding issue on OS X (and Linux?) with spaces in paths and arguments.注意:根据MattPassell 的评论,在 OS X(和 Linux?)上似乎存在一个悬而未决的问题,路径和 arguments 中有空格。 The config below for OS X works around this by avoiding spaces.下面的 OS X 配置通过避免空格来解决这个问题。

  1. Preferences → Team → SVN → Diff Viewer首选项 → 团队 → SVN → 差异查看器
  2. Add...添加...
  3. Extension or mime-type : *扩展名或 mime 类型*
  4. Diff program arguments → Program Path : enter the path for the Beyond Compare binary (with no arguments).差异程序 arguments → 程序路径:输入 Beyond Compare 二进制文件的路径(不带参数)。 Eg:例如:
    • OS X: /Users/tom/bin/bcomp (which is a symlink to /Applications/Beyond Compare.app/Contents/MacOS/bcomp to avoid spaces in the path) OS X: /Users/tom/bin/bcomp (这是/Applications/Beyond Compare.app/Contents/MacOS/bcomp的符号链接,以避免路径中的空格)
    • Windows: C:\Program Files (x86)\Beyond Compare 3\BComp.exe Windows: C:\Program Files (x86)\Beyond Compare 3\BComp.exe
  5. Diff program arguments (box):差异程序arguments (盒):
    • OS X:操作系统:
       ${base} ${mine} -lefttitle=Base -righttitle=Local
    • Windows: Windows:
       "${base}" "${mine}" /lefttitle="Base ${base}" /righttitle="Local ${mine}"
  6. Merge program arguments → Program path : path to binary again.合并程序 arguments → 程序路径:再次进入二进制路径。
  7. Merge program arguments (box):合并程序arguments (盒):
    • OS X:操作系统:
       ${theirs} ${mine} ${base} ${merged} -lefttitle=Incoming -centertitle=Base -righttitle=Local -outputtitle=Merged
    • Windows: Windows:
       "${theirs}" "${mine}" "${base}" "${merged}" /lefttitle="Incoming (${theirs})" /centertitle="Base (${base})" /righttitle="Local (${mine})" /outputtitle="Merged (${merged})"
  8. OK好的

Beyond Compare 的 Eclipse 3.7 (Indigo) 颠覆性配置

I have tried and failed to configure Beyond Compare as a diff tool with Subclipse (it seems to only have external tool configuration for merge/conflict).我尝试使用 Subclipse 将 Beyond Compare 配置为差异工具但失败(它似乎只有用于合并/冲突的外部工具配置)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM