1

I am using the Cornerstone.

The version of Beyond Compare is 4.2.1 (build 22354).

How to using the command line to open Beyond Compare for svn.

I want to set the Beyond Compare as the diff tool for svn.

Comparing Revisions in the Timeline View
To compare two revisions in the timeline view:
Select the first revision by clicking the revision in the timeline.
Select the second revision by holding down the ⌘ key while clicking the revision.
The files are compared in the compare view underneath the timeline. The earlier revision is always displayed on the left.
Folders cannot be compared.

This method is OK.

https://www.zennaware.com/cornerstone/helpbook/pages/working/history/timeline/comparing.html

I don't know how to use AppleScript.

halfer
  • 19,824
  • 17
  • 99
  • 186
jiexishede
  • 2,473
  • 6
  • 38
  • 54

3 Answers3

2

There are instructions for configuring Beyond Compare as Cornerstone's diff tool right on the BC website

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
  set original_path to (item 1 of argv)
  set modified_path to (item 3 of argv)
  do shell script "/usr/local/bin/bcomp \"" & original_path & "\" \"" & modified_path & "\""
end run

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

Open the AppleScript editor, paste in the script above, save the file and then point BC at the file you just created.

Community
  • 1
  • 1
alroc
  • 27,574
  • 6
  • 51
  • 97
  • I save the file and use it in the Cornerstone. I use the script in the cornerstone, then the error "error: sh: /usr/local/bin/bcomp: No such file or directory (127)" shows me. >"then point BC at the file you just created. " How to do it? – jiexishede May 14 '17 at 12:58
  • Do you have the path to bcomp correct in the script? Do you have the path to your script correct in the beyond compare settings? – alroc May 14 '17 at 13:10
  • It's OK now. Because I don't put the `Beyond Compare' to the application folder. The 'Beyond Compare` stay in the download folder. I put the `Beyond Compare` to the application folder. Then it works well. – jiexishede May 14 '17 at 13:13
  • When I close the `Beyond compare` the alert is "The command exits when the state is nonzero". How to fix it? – jiexishede May 14 '17 at 13:39
  • 1
    BC doesn't install to /usr/local/bin by default; if you use the **Beyond Compare** > **Install Command Line Tools...** menu item it will. The AppleScript should refer to that; don't point directly at the bcomp in the .app bundle – Zoë Peterson May 15 '17 at 14:22
0

set beyond compare as the diff editor/tool from the svn preferences.

radarbob
  • 4,964
  • 2
  • 23
  • 36
  • I don't see the `beyond compare` in the menu. – jiexishede May 14 '17 at 07:54
  • I'm sorry, I don't have SVN installed on my (this) macintosh. However I've set Beyond Compare on a PC, and it was the SVN properties/configuration somewhere. I had to type in the file path/name. Then when you use SVN to diff two files, beyond compare will be used. – radarbob May 14 '17 at 08:32
  • Cornerstone, preferences, external compare tool, a select menu. – jiexishede May 14 '17 at 08:35
  • oh, sorry. I checked cornerstone documentation and beyond compare is not listed as a supported diff tool. Wacky though: I wonder if "preferences | locations | use shared subversion configuration" could access the configuration set using another svn tool. Or go into the .subversion file and mess with the config - but touching that folder is not recommended. – radarbob May 14 '17 at 09:02
  • I am a newbie. I can't do the difficult thing. Thank you. – jiexishede May 14 '17 at 09:08
  • @jiexishede you won't move past "newbie" stage until you start *trying* the "difficult thing". You might even surprise yourself by being successful after an attempt or two. And sometimes the "difficult thing" is only a simple web search away. – alroc May 14 '17 at 11:08
0

"The command exits when the state is nonzero" You can modify the script from '/usr/local/bin/bcomp' to '/usr/local/bin/bcompare'