I have not upgraded to Subversion 1.7 yet. I'm still on 1.6.17.

One reason is that there is a script I like to use, that I wrote, called 
svntwdiff. It goes like this:


$ cat svntwdiff 
#!/bin/bash

if [ -z "$1" ]; then
    echo "usage: $0 <file>"
    exit 1
fi

FILE="$1"
FILEDIR="$(dirname "${FILE}")"
FILEBASE="$(basename "${FILE}")"
SVNDIR="${FILEDIR}/.svn"
ORIGFILE="${SVNDIR}/text-base/${FILEBASE}.svn-base"

if [ ! -f "${FILE}" ]; then
    echo "error: ${FILE} doesn't exist"
    exit 1
fi

if [ ! -d "${SVNDIR}" ]; then
    echo "error: ${SVNDIR} doesn't exist; maybe ${FILEDIR} isn't a working copy"
    exit 1
fi

if [ ! -f "${ORIGFILE}" ]; then
    echo "error: ${ORIGFILE} doesn't exist; maybe ${FILE} hasn't been committed 
yet"
    exit 1
fi

twdiff "${FILE}" "${ORIGFILE}"


"twdiff" is a command-line wrapper that comes with the GUI TextWrangler editor; 
it opens the two given textfiles in TextWrangler and lets me view and edit the 
differences between files. I often use svntwdiff to examine changes in a file 
and selectively back out portions of them.

How can I modify this script to be compatible with a Subversion 1.7 format 
working copy?


Reply via email to