I would go for something like this:
#! /bin/bash
set -eu ## Stop on errors and on undefined variables
## The local directory name
LOCAL_DIR=$1
## The remote directory in rsync sintax. Example: "machine:directory"
REMOTE_DIR=$2
shift
shift
# Now the first two args are gone and any other remaining arguments, if any,
# can be expanded with $* or $@
# Create temporary file in THIS directory (hopefully in the same disk as $1:
# we need to hard link, which can only made in the same partition)
tmpd="$(mktemp -d "$PWD/XXXXXXX.tmp" )"
# Upon exit, remove temporary directory, both on error and on success
trap 'rm -rf "$tmpd"' EXIT
# Make a *hard-linked* copy of our repository. It uses very little space
# and is very quick
cp -al "$LOCAL_DIR" "$tmpd"
# Copy the files. The final «"$@"» allows us to pass on arguments for rsync
# from the command line (after the two directories).
rsync -a "$REMOTE_DIR"/ "$tmpd/" --size-only "$@"
# Compare both trees
meld "$LOCAL_DIR" "$tmpd"
For example:
$ cd svn
$ rsyncmeld myproject othermachine:myproject -v --exclude '*.svn' --exclude build
--dry-runwill depend on your use of the-vand--progress options- so if you get no output at all check these options are set as needed. I've noticed that it will send directory names even when files have not changed, but you can filter these out by passing the output throughsedor similar. – David Spillett Apr 02 '13 at 16:55