Need help configuring external diff with Eclipse

此生再无相见时 提交于 2019-12-10 09:22:42

问题


I am trying to set up my dev environment and I got SVN running with Eclipse on my mac (with Subclipse). However, when I click on a file I've changed and go to Compare With -> Latest From Repository, I noticed I was getting (what I think is) a sub-par diff tool.

So, I went to Preferences -> Team -> SVN -> Diff/Merge to configure an external diff tool (called "DiffMerge"). However, no matter what I put in the "External" field and the "Parameters" field, I cannot get the DiffMerge tool to work.

For example, I tried "/Applications/DiffMerge" in the External field (I put the executable directly in the Applications folder for now) and made the parameters: "${base}" "${yours}". However, when I return to my modified file and hit compare with -> Lates from repository, I still get the same built-in diff tool.

Any ideas or resources you could point me to would be greatly appreciated (I've been hunting around stackoverflow myself for answers but to no avail).


回答1:


I started using Mac recently and I faced the same problem. As suggested by Chris I got it working for DeltaWalker.

Steps : 1. Install BeyondCVS plugin with svn. This will ensure that BeyondCompare is added under Eclipse -> Preferences -> External Tools.

  1. Open Eclipse -> Preferences -> External Tools -> Beyond Compare.

  2. In the "Path To Beyond Compare" manually enter the installation folder for Delta Walker which on my machine is "/Applications/DeltaWalker.app/Contents/MacOS/DeltaWalker"




回答2:


I beleive DiffMerge is a .app is it not? In that case i think you would have to give the path to actual binary which should be something like: /Applications/DiffMerge.app/Contents/MacOS/DiffMerge. If you right click on the app in Finder an do "Show Contents" it shoudl allow you to browse it like the regular directory it is... Or you can navigate into it from the command line and find the bianary you need.

Just out of curiosity whats worng with Subclipse's built in tool? IMO its the best Diff/Merge on OSX - but maybe im missing something.




回答3:


I am using the BeyondCVS plugin with SVN. Despite its name, it works both Subclipse and Subversive. And it will launch comparison apps other than BeyondCompare, (I've used WinMerge), so it may work with DiffMerge on the Mac.




回答4:


I was able to get this to work after some experimentation. You need to trick Subclipse into finding the right file to open.

  1. Open finder and navigate to DiffMerge.app
  2. Right click > "Show Package Contents"
  3. Navigate to Contents/MacOS/DiffMerge
  4. Right click > "Make Alias"
  5. Drag and Drop the "DiffMerge alias" file to your home folder
  6. In Eclipse, select the alias file as the external diff program
  7. Set the parameters to "-m -t1=Theirs -t2=Merged -t3=Mine -r=${merged} ${theirs} ${base} ${yours}"


来源:https://stackoverflow.com/questions/1860345/need-help-configuring-external-diff-with-eclipse

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