On Apr 13, 2012, at 04:58, Daniel Shahaf wrote: > Ryan Schmidt wrote on Fri, Apr 13, 2012 at 04:55:17 -0500: >> >> On Apr 13, 2012, at 04:43, Daniel Shahaf wrote: >> >>> 1.x-compatible: >>> use 'svn cat' to obtain a tempfile. >> >> That's a good idea. It sounds like this would be less work and >> automatically backward- and future-compatible. > > Indeed. Just make sure to pass @BASE to avoid a round trip to the server. > > (you may want to double-check that it indeed avoids a server round-trip > in that case; it should, but I never verified whether it does.)
There didn't appear to be any traffic to my repository regardless if I added @BASE or not but I added it anyway since you said to. Here's the new script for anyone interested. Thanks again for your help. $ cat svntwdiff #!/bin/bash # http://svn.haxx.se/users/archive-2012-04/0090.shtml if [ -z "$1" ]; then echo "usage: $0 <file>" exit 1 fi FILE="$1" if [ ! -f "${FILE}" ]; then echo "error: ${FILE} doesn't exist" exit 1 fi if [ -z "${TMPDIR}" ]; then TMPDIR=/tmp fi svn info "${FILE}" >/dev/null || exit $? TMPFILE="$(mktemp "${TMPDIR}/svntwdiff.XXXXXXXXXX")" svn cat "${FILE}"@BASE > "${TMPFILE}" twdiff --wait --resume "${FILE}" "${TMPFILE}" rm -f "${TMPFILE}"