Using Beyond Compare inside Eclipse for Merging in Subversion

北战南征 提交于 2019-11-28 22:07:22

问题


I would like to use Beyond Compare inside Eclipse. 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. 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.
  2. Tried to integrate Beyond Compare as the diff viewer (see 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.

Has anyone succeeded in integrating Beyond Compare in Eclipse for Subversion? I have found the similar question How to configure Beyond Compare 3 for Eclipse conflict resolution?, but it did not work for me (perhaps the difference between Subversive and 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. 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"
  5. When pressing Ok, a dialog pops up that ask if it is ok to open the "Synchronize View".
  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.

回答1:


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):

Note: per MattPassell's comment there seems to be an outstanding issue on OS X (and Linux?) with spaces in paths and arguments. The config below for OS X works around this by avoiding spaces.

  1. Preferences → Team → SVN → Diff Viewer
  2. Add...
  3. Extension or mime-type: *
  4. Diff program arguments → Program Path: enter the path for the Beyond Compare binary (with no arguments). E.g.:
    • OS X: /Users/tom/bin/bcomp (which is a symlink to /Applications/Beyond Compare.app/Contents/MacOS/bcomp to avoid spaces in the path)
    • Windows: C:\Program Files (x86)\Beyond Compare 3\BComp.exe
  5. Diff program arguments (box):
    • OS X:
      ${base} ${mine} -lefttitle=Base -righttitle=Local
    • Windows:
      "${base}" "${mine}"
      /lefttitle="Base ${base}"
      /righttitle="Local ${mine}"
      
  6. Merge program arguments → Program path: path to binary again.
  7. Merge program arguments (box):
    • OS X:
      ${theirs} ${mine} ${base} ${merged}
      -lefttitle=Incoming
      -centertitle=Base
      -righttitle=Local
      -outputtitle=Merged
    • Windows:
      "${theirs}" "${mine}" "${base}" "${merged}"
      /lefttitle="Incoming (${theirs})"
      /centertitle="Base (${base})"
      /righttitle="Local (${mine})"
      /outputtitle="Merged (${merged})"
      
  8. OK

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).



来源:https://stackoverflow.com/questions/6306845/using-beyond-compare-inside-eclipse-for-merging-in-subversion

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!