Starting from version 1.1.6, the DiffFork command-line utility supports OPTION "-w --wait",
which can be used to help work with 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.
difffork file1 file2 [OPTION]
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.
- Create a shell script gitdfdiff.sh with the following content:
difffork "$2" "$5" -w
set the GIT_EXTERNAL_DIFF variable in shell, replace FULLPATH with your full script path.
In your Git working directory, type:
Mercurial has a detail instruction on how to use external programs to compare
revisions, or revision with working dir:
To use extdiff command:
- Enable the extension (in ~/.hgrc):
Use the -p option specify DiffFork as external diff utility, and -o option to specify options.
hg extdiff -p difffork -o -w
To create custom extdiff commands:
# add new command that runs DiffFork
cmd.dfdiff = difffork
opts.dfdiff = -w
Invoke the new command
Subversion has an instruction on how to use external programs:
- Create a Python shell script svndfdiff.py with the following content (replace FULLPATH with your full difffork path):
# 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']
# Return an errorcode of 0 if no differences were detected, 1 if some were.
# Any other errorcode will be treated as fatal.
In your Subversion working directory, type:
svn diff --diff-cmd svndfdiff.py