Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use Kaleidoscope 2 with Git Tower?

Tags:

git

git-tower

Kaleidoscope 2 public beta was released this week and has gained merge functionality. Yay! However, the command-line usage is somewhat vague about the usage. I want to use Kaleidoscope together with Git Tower, how can I do that?

$ ksdiff --help
usage: ksdiff - send files to Kaleidoscope
command options:                        
  [--wait, -w | --no-wait]              whether to wait for the document to be
                                        closed in Kaleidoscope before exiting

FILE options:
  [--snapshot | --no-snapshot]          whether the file is temporary. this
                                        option will override the heuristics
                                        ksdiff would otherwise use to determine
                                        this state.

commands:
  --merge                               send a merge
                                        implies --wait
    --output OUTPUT                     use OUTPUT as the destination path for
                                        this merge. creates OUTPUT if it does
                                        not exist.
    [--base BASE]                       use BASE as the base content for this
                                        merge. can improve the quality of the
                                        default selections for some merges.
    FILE FILE                           the files to merge

Support docs for external merge tools from Git Tower

like image 255
Bouke Avatar asked Nov 21 '12 20:11

Bouke


3 Answers

If you're using the MAS version of Kaleidoscope, you must install the ksdiff tool manually in order for Tower to be able to launch Kaleidoscope.

Download it here http://www.kaleidoscopeapp.com/ksdiff2

like image 197
Dave Wood Avatar answered Sep 29 '22 18:09

Dave Wood


The missing link for me was going to: http://www.kaleidoscopeapp.com/ksdiff2 and installing the Kaleidosope command line tools (ksdiff), currently my "Read More" button in "Kaleidoscope > integrations.." is not linked so I hope that helps somebody else who may have been unsuccessful. Another possible missing step is the Tower Command Line Utility installation in "Tower > Preferences > Integration", from there you can go to "Git Config" tab and select Kaleidoscope as your Diff/Merge Tool.

like image 13
ISAIAHpacheco Avatar answered Sep 29 '22 18:09

ISAIAHpacheco


Update as of Git Tower 1.4.14

Git Tower (version 1.4.14 and above) now ships with Kaleidoscope 2 integration. The launcher scripts shown below should not be used anymore, as they do not work correctly with Kaleidoscope 2 final version.


Kaleidoscope provides the correct command line usage when Integration > Git merge is chosen. The correct launcher script for Git Tower looks like this:

~/Library/Application Support/Tower/CompareScripts/kaleidoscope2.sh

#!/bin/sh

LOCAL="$1"
REMOTE="$2"
BASE="$3"
MERGED="$4"

APPLICATION_PATH=/Applications/Kaleidoscope.app
CMD="$APPLICATION_PATH/Contents/MacOS/ksdiff"

"$CMD" --merge --output "$MERGED" --base "$BASE" -- "$LOCAL" --snapshot "$REMOTE" --snapshot

~/Library/Application Support/Tower/CompareTools.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
    <dict>
        <key>ApplicationIdentifier</key>
        <string>com.blackpixel.kaleidoscope</string>
        <key>ApplicationName</key>
        <string>Kaleidoscope</string>
        <key>DisplayName</key>
        <string>Kaleidoscope</string>
        <key>LaunchScript</key>
        <string>kaleidoscope2.sh</string>
        <key>Identifier</key>
        <string>kaleidoscope2</string>
        <key>SupportsMergeTool</key>
        <true/>
    </dict>
</array>
</plist>
like image 8
Bouke Avatar answered Sep 29 '22 18:09

Bouke