Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Beyond Compare inside Eclipse for Merging in Subversion

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.
like image 401
mliebelt Avatar asked Jun 10 '11 13:06

mliebelt


People also ask

How do I use Beyond Compare in Eclipse?

To run Beyond Compare, WinSCP or Putty click on the icons in the main Eclipse toolbar. There are also many actions that are found in the Compare With and Team context menus which are found by right-clicking on a file or folder in the Eclipse Package Explorer or Navigator views.


1 Answers

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

Eclipse 3.7 (Indigo) Subversive configuration for Beyond Compare

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

like image 130
Tom Clift Avatar answered Nov 07 '22 19:11

Tom Clift