Skip to Content
Integrate with Other AppsGit, Hg, Bazaar, SVN

Integrating with Git, Hg, Bazaar, SVN

DeltaWalker Classic integrates with source control systems (SCMs) and other apps through its command line.

DeltaWalker Classic integrates with Bazaar, Git, Mercurial and Subversion for you. To use it as their external diff and merge tool, open the SCM Integration page of the Settings window, check the SCMs you use, and click OK. DeltaWalker Classic updates their configuration files for you.

The page lists all four SCMs, each with the default location of its configuration file. The configuration file must already exist: if it is not in the default location, the page says so; select the SCM and click Browse to locate the file. When you uncheck an SCM and click OK, DeltaWalker Classic comments out the lines it added.

The SCM Integration page is not in the Mac App Store edition of DeltaWalker Classic Free, because the App Sandbox does not let an app change the configuration of other programs. There, and for apps the page does not cover, follow the manual instructions below. They also show what the automatic integration does behind the scenes.

DeltaWalker Classic detects the type of the resources it is given. When it receives file or folder paths on the command line, it opens a file or folder comparison according to their type and count.

Three-way merging needs three-way comparison, which is part of the Pro and Oro editions. DeltaWalker Classic Free opens a two-way comparison instead.

The integration scripts that the instructions refer to come with DeltaWalker Classic. With a default installation, they are in:

  • macOS: /Applications/DeltaWalker Classic.app/Contents/Resources/
  • Windows: C:\Program Files\Deltopia\DeltaWalker Classic\
  • Linux: the DeltaWalker-Classic folder that you unpacked the archive into

If you installed DeltaWalker Classic elsewhere, adjust the paths in the examples below accordingly.

The scripts start DeltaWalker Classic with -mi, a new instance, so that the SCM waits until you are done. When you have finished a comparison or merge, quit that DeltaWalker Classic instance to return to the SCM.

Below are the integration instructions for the SCMs DeltaWalker Classic has been tested with:

Bazaar

Automatic integration

Use the SCM Integration page: check Bazaar, then click OK.

Usage

You can now run bzr dwdiff in your local Bazaar branch just as you would run bzr diff.

To use DeltaWalker Classic as Bazaar’s external merge tool for resolving conflicts, you need Bazaar’s extmerge plugin. If it is not installed yet, install it as follows.

On macOS and Linux, run the following commands in a Terminal window:

mkdir -p ~/.bazaar/plugins cd ~/.bazaar/plugins bzr branch lp:bzr-extmerge extmerge

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

cd "C:\Program Files\Bazaar\plugins" bzr branch lp:bzr-extmerge extmerge

You can now resolve conflicts with DeltaWalker Classic by running:

bzr emerge filename

or

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, or need to repair it, you can skip the manual integration steps that follow.

macOS and Linux

To make DeltaWalker Classic Bazaar’s external diff and merge tool, add the following to Bazaar’s configuration file, ~/.bazaar/bazaar.conf:

[DEFAULT] external_merge = "/Applications/DeltaWalker Classic.app/Contents/Resources/bzr-merge" %t %o %b %r [ALIASES] dwdiff = diff --using "/Applications/DeltaWalker Classic.app/Contents/Resources/bzr-diff"

The example uses the default installation location on macOS. On Linux, or if you installed DeltaWalker Classic elsewhere, use the path of your DeltaWalker-Classic folder.

The two shell scripts referenced above contain the following:

bzr-diff:

#!/bin/sh DW_PATH=`dirname "$0"` if [ -d "$DW_PATH/../MacOS" ]; then DW_PATH="$DW_PATH/../MacOS" fi "$DW_PATH/DeltaWalker" "$1" "$2" -nosplash -mi

bzr-merge:

#!/bin/sh DW_PATH=`dirname "$0"` if [ -d "$DW_PATH/../MacOS" ]; then DW_PATH="$DW_PATH/../MacOS" fi "$DW_PATH/DeltaWalker" "$1" "$2" "$3" -merged="$4" -nosplash -mi

Windows

To make DeltaWalker Classic Bazaar’s external diff and merge tool, add the following to Bazaar’s configuration file, %APPDATA%\bazaar\2.0\bazaar.conf:

[DEFAULT] external_merge = "C:/Program Files/Deltopia/DeltaWalker Classic/bzr-merge.bat %t %o %b %r" [ALIASES] dwdiff = 'diff --using "C:/Program Files/Deltopia/DeltaWalker Classic/bzr-diff.bat"'

If DeltaWalker Classic is installed elsewhere, change the paths in bazaar.conf accordingly.

The two batch files above contain the following:

bzr-diff.bat:

@echo off set DW_PATH=%~dp0 "%DW_PATH%\DeltaWalker" "%1" "%2" -nosplash -mi

bzr-merge.bat:

@echo off set DW_PATH=%~dp0 "%DW_PATH%\DeltaWalker" "%1" "%2" "%3" -merged="%4" -nosplash -mi

Git

Automatic integration

Use the SCM Integration page: check Git, then click OK. On Windows, use the manual integration below.

Usage

You can now use DeltaWalker Classic as Git’s external diff and merge tool by running:

git difftool

or

git mergetool

When you have finished a merge, save the Reference pane (the middle one) with File > Save, the toolbar button, or Cmd+S: DeltaWalker Classic writes it to the file that Git passed to it with -merged.

Manual Integration

macOS and Linux

To make DeltaWalker Classic Git’s diff and merge tool, add the following to Git’s global configuration file, ~/.gitconfig:

[diff] tool = deltawalker [difftool] prompt = false [difftool "deltawalker"] cmd = '/Applications/DeltaWalker Classic.app/Contents/Resources/git-diff' "$LOCAL" "$REMOTE" [merge] tool = deltawalker [mergetool] keepBackup = false [mergetool "deltawalker"] cmd = '/Applications/DeltaWalker Classic.app/Contents/Resources/git-merge' "$LOCAL" "$REMOTE" "$BASE" "$MERGED"

The example uses the default installation location on macOS. On Linux, or if you installed DeltaWalker Classic elsewhere, use the path of your DeltaWalker-Classic folder.

The two shell scripts in the example contain the following:

git-diff:

#!/bin/sh DW_PATH=`dirname "$0"` if [ -d "$DW_PATH/../MacOS" ]; then DW_PATH="$DW_PATH/../MacOS" fi "$DW_PATH/DeltaWalker" "$1" "$2" -nosplash -mi

git-merge:

#!/bin/sh DW_PATH=`dirname "$0"` if [ -d "$DW_PATH/../MacOS" ]; then DW_PATH="$DW_PATH/../MacOS" fi "$DW_PATH/DeltaWalker" "$1" "$2" "$3" -merged="$4" -nosplash -mi

Windows

To make DeltaWalker Classic Git’s diff and merge tool, add the following to Git’s global configuration file, %USERPROFILE%\.gitconfig:

[diff] tool = deltawalker [difftool] prompt = false [difftool "deltawalker"] cmd = 'C:/Program Files/Deltopia/DeltaWalker Classic/DeltaWalker.exe' "$LOCAL" "$REMOTE" -nosplash -mi [merge] tool = deltawalker [mergetool] keepBackup = false [mergetool "deltawalker"] cmd = 'C:/Program Files/Deltopia/DeltaWalker Classic/DeltaWalker.exe' "$LOCAL" "$REMOTE" "$BASE" -merged="$MERGED" -nosplash -mi

If DeltaWalker Classic is installed elsewhere, change its path in .gitconfig accordingly.

Mercurial

Automatic integration

Use the SCM Integration page: check Mercurial, then click OK.

Usage

You can now have Mercurial start DeltaWalker Classic when you compare or merge:

hg dw
hg merge

Manual Integration

macOS and Linux

To make DeltaWalker Classic Mercurial’s external diff and merge tool, add the following to Mercurial’s configuration file, ~/.hgrc:

[ui] merge = dw [extensions] hgext.extdiff = [extdiff] cmd.dw = /Applications/DeltaWalker Classic.app/Contents/Resources/hg [merge-tools] dw.executable = /Applications/DeltaWalker Classic.app/Contents/Resources/hg dw.args = $local $other $base $output

The example uses the default installation location on macOS. On Linux, or if you installed DeltaWalker Classic elsewhere, use the path of your DeltaWalker-Classic folder.

The hg shell script referenced above contains the following:

hg:

#!/bin/sh DW_PATH=`dirname "$0"` if [ -d "$DW_PATH/../MacOS" ]; then DW_PATH="$DW_PATH/../MacOS" fi "$DW_PATH/DeltaWalker" "$1" "$2" "$3" -merged="$4" -nosplash -mi

Windows

To make DeltaWalker Classic Mercurial’s external diff and merge tool, add the following to Mercurial’s configuration file, %USERPROFILE%\.hgrc:

[ui] merge = dw [extensions] hgext.extdiff = [extdiff] cmd.dw = C:/Program Files/Deltopia/DeltaWalker Classic/hg.bat [merge-tools] dw.executable = C:/Program Files/Deltopia/DeltaWalker Classic/hg.bat dw.args = $local $other $base $output

The batch file hg.bat is in the DeltaWalker Classic installation folder. If DeltaWalker Classic is installed elsewhere, change its path in .hgrc accordingly. It should contain the following:

hg.bat:

@echo off set DW_PATH=%~dp0 "%DW_PATH%\DeltaWalker" "%1" "%2" "%3" -merged="%4" -nosplash -mi

Subversion

Version Control with Subversion  is the definitive guide to Subversion, and its Using External Differencing Tools  section explains how Subversion works with external diff tools.

Automatic integration

Use the SCM Integration page: check Subversion, then click OK.

Usage

To start DeltaWalker Classic as a two-way diff tool, run:

svn diff

To start DeltaWalker Classic as a merge tool to resolve conflicts, run:

svn update

When Subversion reports a conflict, it asks you to select an option, for example:

Select: (p) postpone, (df) diff-full, (e) edit, (mc) mine-conflict, (tc) theirs-conflict, (s) show all options:

Choose l (launch) to start DeltaWalker Classic. Subversion does not list it among the options it shows first; choose s to see it. After resolving the conflict, save the file in the middle pane, the common ancestor from which both of the other versions were derived. Then quit DeltaWalker Classic and choose r (resolved).

Manual Integration

macOS and Linux

Edit the Subversion configuration file, ~/.subversion/config. Uncomment, or add if missing, the lines below and set them as follows:

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

The example uses the default installation location on macOS. On Linux, or if you installed DeltaWalker Classic elsewhere, use the path of your DeltaWalker-Classic folder. If the file sets diff3-cmd, comment it out.

svn-diff:

#!/bin/sh DW_PATH=`dirname "$0"` if [ -d "$DW_PATH/../MacOS" ]; then DW_PATH="$DW_PATH/../MacOS" fi "$DW_PATH/DeltaWalker" "$6" "$7" -nosplash -mi

svn-merge:

#!/bin/sh DW_PATH=`dirname "$0"` if [ -d "$DW_PATH/../MacOS" ]; then DW_PATH="$DW_PATH/../MacOS" fi "$DW_PATH/DeltaWalker" "$3" "$2" "$1" -merged="$4" -nosplash -mi

Windows

Edit the Subversion configuration file, %APPDATA%\Subversion\config, and add the lines below:

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

These batch files contain the following:

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

Dernière mise à jour le