Integrating with Other Apps
Git, Hg, Bazaar, SVN

Integrating with Git, Hg, Bazaar, SVN

Integrating DeltaWalker with CM, SC and other apps is done via command line interface.

DeltaWalker is the only comparison tool to offer a one-click integration with some of the most popular SCMs: Bazaar, Git, Mercurial and Subversion. If one or more of these SCMs is installed on your system and you want to use DeltaWalker as their external diff and merge tool, all you need to do is go to the SCM Integration Settings page, select the SCM(s) of interest, and DeltaWalker will do all the picky and often tedious work behind the scenes for you. One click. That's it.

Not all SCMs or apps can be integrated with one click though. For those, we offer the specific instructions below. For the curious, and for completeness, we also offer the details on the behind-the-scenes work performed by DeltaWalker for when one-click-integration is supported.

It's worth noting that DeltaWalker automatically detects the type of resources that are passed to it for comparison. That is, when given one or more file or folder URIs as command line parameters, DeltaWalker detects their type and count and compares them accordingly.

DeltaWalker provides easy way to Automatic integration of some Source control systems. Please refer to Automatic integration section for the particular SCMs to use this feature.

Below are the integration instructions with SCMs and apps DeltaWalker has been tested with:

Bazaar

Automatic integration

Use the SCM Integration preference page. If Bazaar is installed on your system, it will be listed—select/check its checkbox, then click OK. If it's not listed, please download Bazaar and install it first.

Usage

You should now be able to run bzr dwdiff in your local Bazaar branch just like you'd run bzr diff.

If you want to use DeltaWalker as Bazaar's external merge tool for resolving conflicts, Bazaar's extmerge plug-in needs to be installed. If necessary, you can install it using the following steps:

On macOS and Linux, execute the following commands in a Terminal/Shell window:

mkdir -p ~/.bazaar/plugins

cd ~/.bazaar/plugins

bzr branch lp:bzr-extmerge extmerge

On Windows, open a Command Prompt window and execute (if necessary, adjust the path to the Bazaar's installation folder):

cd C:\Program Files\Bazaar\plugins

bzr branch lp:bzr-extmerge extmerge

You should now be able to resolve conflicts using DeltaWalker by running:

bzr emerge filename

bzr emerge --all

When you are sure that the conflict has been resolved, run:

bzr resolve filename

or

bzr resolve --all

Manual Integration

Unless you want to know what automatic integration does for you behind the scenes, or something has gone wrong with it and you need to set it straight, you can ignore the manual integration steps that follow.

Mac OS and Linux

Instruct Bazaar to use DeltaWalker as its external diff and merge tool by adding the following to Bazaar's configuration file ~/.bazaar/bazaar.conf :

[DEFAULT] external_merge = /Applications/DeltaWalker.app/Contents/Resources/bzr-merge %t %o %b %r

[ALIASES] dwdiff = diff --using "/Applications/DeltaWalker.app/Contents/Resources/bzr-diff"

The above example uses the default DeltaWalker install location on macOS. If DeltaWalker was installed in a different location, or if you are using Linux, please update the path to the DeltaWalker executable accordingly.

The two shell scripts referenced above should have the following content:

bzr-diff:

#!/bin/sh

DW_PATH=`dirname "$0"`

"$DW_PATH/DeltaWalker" "$1" "$2" -nosplash -mi -pwd="`pwd`"

bzr-merge:

#!/bin/sh

DW_PATH=`dirname "$0"`

"$DW_PATH/DeltaWalker" "$1" "$2" "$3" -merged="$4" -nosplash -mi -pwd="`pwd`"

Windows

Instruct Bazaar to use DeltaWalker as its external diff and merge tool by adding the following to Bazaar's configuration file %APPDATA%\bazaar\2.0\bazaar.conf :

[DEFAULT] external_merge = "C:/Program Files/Deltopia/DeltaWalker 2.0/bzr-merge.bat %t %o %b %r"

[ALIASES] dwdiff = 'diff --using "C:/Program Files/Deltopia/DeltaWalker 2.0/bzr-diff.bat"'

Note: if DeltaWalker is installed in a different location, you need to reflect that in the bazaar.conf file.

The two batch files above have the following content:

bzr-diff.bat:

@echo off

set DW_PATH=%~dp0

"%DW\_PATH%\\DeltaWalker" "%1" "%2" "%3" -merged="%4" -nosplash

bzr-merge.bat:

@echo off

set DW_PATH=%~dp0

"%DW\_PATH%\\DeltaWalker" "%1" "%2" -nosplash

Git

Automatic integration

Use the SCM Integration Settings page. If Git is installed on your system, it will be listed—select/check its checkbox, then click OK. If it's not listed, please download Git and install it first.

Usage

You should now be able to use DeltaWalker as Git's external diff and merge tool by running:

git diff

or

git mergetool

Manual Integration

Mac OS and Linux

Tell Git to use DeltaWalker as its external diff and merge tool by adding the following to Git's global configuration file ~/.gitconfig :

[diff]
    external = "/Applications/DeltaWalker.app/Contents/Resources/git-diff"

[merge]
    tool = deltawalker

[mergetool  "mydeltawalker"]
    cmd = '/Applications/DeltaWalker.app/Contents/Resources/git-merge' "$LOCAL" "$REMOTE" "$BASE" "$MERGED"

The two shell scripts in the example above have the following content:

git-diff:

#!/bin/sh

DW_PATH=`dirname "$0"`

"$DW_PATH/DeltaWalker" "$2" "$5" -nosplash -mi -pwd="$PWD"

The file git-merge should have the following content:

#!/bin/sh

DW_PATH=`dirname "$0"`

"$DW_PATH/DeltaWalker" "$1" "$2" "$3" -merged="$4" -nosplash -mi -pwd="$PWD"

These files change the order of the parameters supplied by git to its diff and the merge commands to the order expected by DeltaWalker.

Windows

Tell Git to use DeltaWalker as its external diff and merge tool by adding the following to Git's configuration file %USERPROFILE%\.gitconfig :

[diff] external = 'C:/Program Files/Deltopia/DeltaWalker 2.0/git-diff'

[merge] tool = deltawalker

[mergetool "deltawalker"] cmd = 'C:/Program Files/Deltopia/DeltaWalker 2.0/git-merge' "$LOCAL" "$REMOTE" "$BASE" "$MERGED"

In the example above, the two shell script files git-diff and git-merge are provided in the DeltaWalker default installation folder e.g. C:/Program Files/Deltopia/DeltaWalker 2.0/ . If DeltaWalker is installed elsewhere, you need to update its path in .gitconfig .

The shell scripts git-diff and git-merge are the same as the ones used for macOS and Linux (above).

Once done merging, you need to save the contents of the Reference panel using the Save menu, button, or shortcut so that DeltaWalker can save it to the file specified by the -merged parameter.

Mercurial

Automatic integration

Use the SCM Integration preference page. If Mercurial is installed on your system, it will be listed—select/check its checkbox, then click OK. If it's not listed, please download Mercurial and install it first.

Usage

You can now use Mercurial to invoke DeltaWalker when you need to perform diff or merge operation:

hg dw

hg merge

Manual Integration

Mac OS and Linux

Tell Mercurial to use DeltaWalker as its external diff and merge tool by adding the following to Mercurial's configuration file ~/.hgrc :

[ui] merge = dw

[extensions] hgext.extdiff =

[extdiff] cmd.dw = /Applications/DeltaWalker.app/Contents/Resources/hg

[merge-tools] dw.executable = /Applications/DeltaWalker.app/Contents/Resources/hg dw.args = $local $other $base -merged=$output

The above example uses the default DeltaWalker installation folder on macOS. If DeltaWalker was installed in a different location, or if you are using Linux, please update its path accordingly.

The above shell script hg should look like this:

hg:

#!/bin/sh

DW_PATH=`dirname "$0"`

"$DW_PATH/DeltaWalker" "$1" "$2" "$3" -merged="$4" -nosplash -mi -pwd="`pwd`"

Windows

Tell Mercurial to use DeltaWalker as its external diff and merge tool by adding the following to Mercurial's configuration file %USERPROFILE%\.hgrc :

[ui] merge = dw

[extensions] hgext.extdiff =

[extdiff] cmd.dw = C:/Program Files/Deltopia/DeltaWalker 2.0/hg.bat

[merge-tools] dw.executable = C:/Program Files/Deltopia/DeltaWalker 2.0/hg.bat dw.args = $local $other $base $output

The batch file hg.bat is located in the default DeltaWalker installation folder. If DeltaWalker has been installed elsewhere, its location will needs to be updated in .hgrc. Its contents should look like this:

hg.bat:

@echo off

set DW_PATH=%~dp0

"%DW_PATH%\DeltaWalker" "%1" "%2" "%3" -merged="%4" -nosplash -mi

Subversion

Version Control with Subversion (opens in a new tab) provides the definitive guide to Subversion and its Using External Differencing Tools (opens in a new tab) section gives a detailed explanation on the topic of integration with external diff tools.

Automatic integration:

Use the SCM Integration preference page. If Subversion is installed on your system, it will be listed—select/check its checkbox, then click OK. If it's not listed, please download Subversion and install it first.

Usage

To launch DeltaWalker as 2-Way diff tool, type:

svn diff

To launch DeltaWalker as merge tool to resolve conflicts, run:

svn update

You will then be prompted to select an option:

Select: (p) postpone, (df) diff-full, (e) edit,

(mc) mine-conflict, (tc) theirs-conflict,

(s) show all options:

Use option 'l' , which, due to config file changes, will launch DeltaWalker ( 'l' is not seen as an option. You can use 's' to see it listed). After resolving the conflict, save file in the center window. (The Original file from which both versions of the Left and the Right files were derived from). Close DeltaWalker and select 'r' for resolved.

Manual Integration:

Mac OS and Linux

Modify the Subversion configuration file: ~/.subversion/config . Uncomment out, or add if missing, the lines shown below and set their values as such:

[helpers] diff-cmd = /Applications/DeltaWalker.app/Contents/Resources/svn-diff merge-tool-cmd = /Applications/DeltaWalker.app/Contents/Resources/svn-merge

The above example uses the default DeltaWalker installation folder on macOS. If DeltaWalker was installed in a different location, or if you are using Linux, please update its path accordingly.

svn-diff:

#!/bin/sh

DW_PATH=`dirname "$0"`

"$DW_PATH/DeltaWalker" "$6" "$7" -nosplash -mi -pwd="`pwd`"

svn-merge:

#!/bin/sh

DW_PATH=`dirname "$0"`

"$DW_PATH/DeltaWalker" "$3" "$2" "$1" -merged="$4" -nosplash -mi -pwd="`pwd`"

Windows

Modify the Subversion configuration file: %APPDATA%\Subversion\config by adding the lines shown below:

[helpers] diff-cmd = "C:\Program Files\Deltopia\DeltaWalker 2.0\svn-diff.bat" merge-tool-cmd = "C:\Program Files\Deltopia\DeltaWalker 2.0\svn-merge.bat"

These batch files should have the following content:

svn-diff.bat:

@echo off

set DW_PATH=%~dp0

"%DW_PATH%\DeltaWalker" "%6" "%7" -nosplash -mi

svn-merge.bat:

@echo off

set DW_PATH=%~dp0

"%DW_PATH%\DeltaWalker" "%3" "%2" "%1" -merged="%4" -nosplash -mi

See Also