Using TortoiseSVN from the Command Line
March 26th, 2008- Save this script to /usr/local/bin/svn (ie. c:\cygwin\usr\local\bin\svn)
- Ammend the svn variable
- chmod u+x /usr/local/bin/svn
As long as /usr/local/bin is first in the path, you can use TortoiseSVN for the good bits, and the command line svn client for the rest.
#!/bin/sh
# Use TortoiseSVN from the cli
# Public Domain, Max Howell 2008
path=$2
test -z $path && path=.
test -e $path && path=`cygpath -wa $path`
svn='/cygdrive/c/progra~1/TortoiseSVN/bin/TortoiseProc.exe'
function svn
{
"$svn" /notempfile /command:"$1" /path:"$path" &
}
case $1 in
up | update) svn update;;
ci | commit) svn commit;;
log) svn log;;
props) svn properties;;
browse) svn repobrowser;;
*) /usr/bin/svn $@;;
esac
