#!/bin/sh

DW_PATH=`dirname "$0"`

# -wait is required below as when there's more than one file has been modified
# Mercurial sends them to DeltaWalker as a folder; if dw.jar returns control,
# then Mercurial will clean up its temp folder and opening those files from
# within the folder comparison will fail.

"$DW_PATH/jre/bin/java" -Ddw.path="$DW_PATH" -jar "$DW_PATH/dw.jar" "$1" "$2" "$3" "$4" "$5" "$6" -wait