Starting from version 1.1.6, the DiffFork command-line utility supports OPTION "-w --wait", which can be used to help work with Bazaar, Git, Mercurial, Subversion, etc.
Note: DiffFork can compare 2 folders/files. 3-way diff/merge is not supported.
To install the command-line utility, choose "Install Command-Line Utility..." from the Help menu.
USAGE difffork file1 file2 [OPTION] DESCRIPTION -w --wait Wait for the diff window to be closed.
The integration instructions provided in this document is a starting point. For more information, please reference the VCS document or contact us for support.
http://doc.bazaar.canonical.com/plugins/en/difftools-plugin.html
register_diff_tool(TreeDiffTool('difffork', diff_options='--wait'))
cd bzr_difftools mkdir -p $HOME/.bazaar/plugins/difftools cp *.py $HOME/.bazaar/plugins/difftools
bzr diff --using difffork
Tips:
[ALIASES] dfdiff = diff --using difffork
#!/bin/sh difffork "$2" "$5" -w
export GIT_EXTERNAL_DIFF=FULLPATH
git diff
Mercurial has a detail instruction on how to use external programs to compare revisions, or revision with working dir: http://mercurial.selenic.com/wiki/ExtdiffExtension
To use extdiff command:
[extensions] hgext.extdiff =
hg extdiff -p difffork -o -w
To create custom extdiff commands:
[extdiff] # add new command that runs DiffFork cmd.dfdiff = difffork opts.dfdiff = -w
hg dfdiff
Subversion has an instruction on how to use external programs: http://svnbook.red-bean.com/en/1.5/svn.advanced.externaldifftools.html
#!/usr/bin/env python import sys import os # Configure your favorite diff program here. DIFF = "FULLPATH" # Subversion provides the paths we need as the last two parameters. LEFT = sys.argv[-2] RIGHT = sys.argv[-1] # Call the diff command (change the following line to make sense for # your diff program). cmd = [DIFF, LEFT, RIGHT, '-w'] os.execv(cmd[0], cmd) # Return an errorcode of 0 if no differences were detected, 1 if some were. # Any other errorcode will be treated as fatal.
svn diff --diff-cmd svndfdiff.py