Application Integration

From ChangesWiki

Jump to: navigation, search

Contents

[edit] Integration with 3rd Party Applications

[edit] Coda

[edit] Changes 1.0.x

To integrate Changes with Coda, and supplant Apple's Developer's Tool as the diff app, follow these steps (albeit at your own risk ;) )

1. Open a Terminal Window.

2. type this: sudo mv /usr/bin/opendiff /usr/bin/opendiff.apple (This will backup the opendiff command in case you want to revert)

3. type this: sudo ln -s /Applications/Changes.app/Contents/Resources/chdiff /usr/bin/opendiff (This creates the symlink to Changes.app)

4. Enjoy using Changes.app as your new diff toll while developing with Coda! (credit: shrop, google coda users group)

[edit] Changes 1.5.x

To integrate Changes with Coda, just use the new Coda integration tool found in the application by selecting the Install Coda Support… menu item from the application menu.

Note however, usage of the Coda plugin requires a different workflow. To use the plugin, open the file you want to diff and make it the active document. Then go to Coda's Plug-ins menu and select "Diff in Changes...". In the window that appears, select the two changesets you want to diff, and then click the "Compare" button.

It's important to note that this plugin DOES NOT work with the the contextual menu "Source Control > Compare With > ...". For that functionality you will still need to apply the modifications outlined above for Changes 1.0, i.e., you will need to create a symlink from /usr/bin/opendiff to /Applications/Changes.app/Contents/Resources/chdiff

[edit] TextMate

Note: this only works for subversion repositories for freelance writer philippines

Installation: You can install the TextMate integration bundle by selecting the Install TextMate Support… item of the application menu.

Uninstallation: To remove the TextMate integration bundle, delete the Changes.tmbundle file from the ~/Library/Application Support/TextMate/Pristine Copy/Bundles/ folder.

[edit] Development

The source of Changes.tmbundle can be found on github: http://github.com/rtmfd/changes-tmbundle/

Grab it, tweak it to your hearts content and I’ll pull all of the freaky goodness you commit back into the master (if it doesn’t suck).

Git Clone Command:

git clone git://github.com/rtmfd/changes-tmbundle.git Changes.tmbundle

[edit] Subversion Bundle

To use changes with TextMate's built-in Subversion Bundle

  • Install the Subversion Integration script.
  • Set the TM_SVN_DIFF_CMD variable to 'svndiffshim.py' (under preferences | advanced).

[edit] BBEdit

Installation: You can install BBEdit integration by selecting the Install BBEdit Support… item of the application menu.

Note: When you install the BBEdit integration scripts, Changes will override the following menu items in BBEdit:

  • Search → Find Differences… (Changes 1.0.x only)
  • Search → Compare Two Front Documents
  • Search → Compare Against Disk File

Uninstallation: To remove the BBEdit integration scripts, please remove the following files from the ~/Library/Application Support/BBEdit/Menu Scripts folder:

  • Search•Compare Against Disk File.scpt
  • Search•Compare Two Front Documents.scpt
  • Search•Find Differences….scpt (Changes 1.0.x only)

Finally remove the following file from the ~/Library/Application Support/BBEdit/Script directory:

  • Diff Against Previous Version….scpt (Changes 1.5.x only)

[edit] TextWrangler

Installation: You can install TextWrangler integration by selecting the Install TextWrangler Support… item of the application menu.

Note: When you install the TextWrangler integration scripts, Changes will override the following menu items in TextWrangler:

  • Search → Find Differences… (Changes 1.0.x only)
  • Search → Compare Two Front Documents
  • Search → Compare Against Disk File

Uninstallation: To remove the TextWrangler integration scripts, please remove the following files from the ~/Library/Application Support/TextWrangler/Menu Scripts folder:

  • Search•Compare Against Disk File.scpt
  • Search•Compare Two Front Documents.scpt
  • Search•Find Differences….scpt (Changes 1.0.x only)

Finally remove the following file from the ~/Library/Application Support/TextWrangler/Script directory:

  • Diff Against Previous Version….scpt (Changes 1.5.x only)

[edit] Cornerstone

Image:Cornerstone48.png Cornerstone is a GUI-based Subversion client from Zennaware. It features built-in Changes support.

[edit] Versions

Versions is another GUI-based Subversion client from the crew at Made by Sofa. It also features Changes support.

[edit] svnX

svnX is a subversion GUI utility for OS X from La Chose Interactive. As of version 1.1, svnX has built-in support for Changes. Make sure you have the changes.app terminal utility installed when using this build. This option is under the Changes menu, "Install Terminal Utility."

Big thanks to Jonathan "Wolf" Rentzsch for earlier support with svnX integration! He's one of the most highly regarded consultants in the field and I'd highly recommend his company if you're looking for fast, effective, professional-grade results.

[edit] XCode 2.5 & 3

To have XCode use Changes to display diffs when using the "Compare" function, do the following:

  • Go to the "SCM" section in XCode's preferences.
  • Select the "Options" tab.
  • Select "Other..." in the pop-up for "View comparisons using:"
  • In the open panel, hit slash (/). In the field that pops up, type in: /<the full path to Changes.app>/Contents/Resources/chdiff
  • Hit "Go"/"Select"/"OK"
  • Profit!

If you are using a version control system not supported by XCode (e.g. Git) you can use this AppleScript to show the SCMHUD for the currently edited file:

tell application "Xcode"
  set sourceFilePath to associated file name of first window
end tell
tell application "Changes"
  show scmhud sourceFilePath
  activate -- remove this line if you don't want Changes to become frontmost app
end tell

[edit] Dreamweaver

To have Dreamweaver use Changes to compare local and remote versions of files, do the following:

  • If you haven't done so already, launch Changes and select Changes → Install Terminal Utility… from the menu
  • Launch Dreamweaver
  • Choose Dreamweaver → Preferences... from the menu
  • Select the "File Compare" category
  • Click "Browse..."
  • The file selection dialog should default to the "/usr/bin" directory (if it doesn't, type a "/" to open the "Goto Folder" pane and enter "/usr/bin", then click Go)
  • Scroll down to "diff" and click "Open" (Dreamweaver doesn't let you select "chdiff" directly because it is a symbolic link)
  • Click in the path text field next to the "Browse..." button (which should now show something like Macintosh HD:usr:bin:diff) and add "ch" before the "diff". You should end up with a path like "Macintosh HD:usr:bin:chdiff"
  • Click OK
  • You can now use the File → Compare with Remote menu option to launch Changes to examine differences between your local file and the file on the server.

[edit] NetBeans

To have NetBeans use Changes to handle diffs:

  • If you haven't done so already, launch Changes and select Changes → Install Terminal Utility… from the menu
  • Launch NetBeans
  • Choose NetBeans → Preferences... from the menu
  • Click the "Miscellaneous", "Diff" tabs
  • Select the "External Diff" option
  • Enter "chdiff {0} {1}" in the Command field.
  • Click OK

[edit] IntelliJ IDEA

You can use Changes as diff tool in IntelliJ IDEA.

  • If you haven't done so already, launch Changes and select Changes → Install Terminal Utility… from the menu
  • Launch IntelliJ IDEA
  • Open Settings window and select General
  • In the bottom of General Window, tick both Diff Options and put "chdiff" in both text fields.
  • Click OK and close the Settings window

[edit] Perforce

You can use Changes as a diff tool in Perforce.

  • If you haven't done so already, launch Changes and select Changes → Install Terminal Utility… from the menu
  • Launch the Perforce Mac OS X p4v client.
  • Select P4V → Preferences... from the menu.
  • Select the "Diff" tab.
  • Select the "Other Application" radio button.
  • Enter "/usr/bin/chdiff" in the "Location:" text field.
  • Click "OK" to confirm the preferences change.

[edit] MacCvsX

You can use Changes as an external Diff app in MacCvsX. As of version 3.3 MacCvsX supports FileMerge, CodeWarrier, BBEdit only.

  • Find MacCvsX app and goto the contents. (right click on the app and choose show package contents)
  • Find diff_in_bbedit.scpt file inside Contents/Resources folder.
  • back up the diff_in_bbedit with some other name. we will replace this file with a new one with same name.
  • create a new applescript file with scripteditor and copy the following into it and name it diff_in_bbedit
  • place this new file in the original location of diff_in_bbedit
  • Go to Preferences in MacCvsX and choose the external diff app as BBEdit.
on DoDiff given theFiles:list
	tell application "Changes"
		activate
		diff (item 1 of theFiles) against (item 2 of theFiles)
	end tell
end DoDiff

[edit] Bounty

If you post a script, helper tool, or integration instructions up here for an application, please contact me at support@(the main site's domain) to claim your complimentary license for Changes 1.5 when it ships.