Cygwin svn conflict with TSVNCache.exe

In my company we are developing portable software that runs on windows and linux (and could also run on other systems). I have written build scripts on linux that do an automatic checkout, compiles that software, generates API documentation and creates an installer.

The windows shell is not very powerfull and it’s nearly impossible to do the same things like with the bash. Aside from this I don’t want to maintain to different scripts which do actually the same for windows and linux.

Yesterday I modified the linux build scripts to run also on windows using cygwin. Cygwin is a great unix emulation for windows where my bash scripts work mostly out of the box. So I can use all the great tools like sed, grep, awk, … that normally are missing on windows.

The problem is, cygwin brings its own unix like svn.exe with it and this seems not to play good with my Windows TortoiseSVN version.

I tried to check out sources like

svn co https://someurl /cygdrive/e/mypath

but nothing apeared there. I found out using google that there is a problem when using it together with TSVNCache.exe. So I changed this to use a native windows commandline version of svn.exe.

The important thing is now that you can’t use unix style paths. You have to use Windows paths like E:\mypath. Of course Cygwin has a solution for converting this paths which is called ‘cygpath’. This tool can convert paths from unix to dos and vice versa.

Now the code looks like that:

2 SOURCE_DIR=`pwd`/src
3 if [ $OS == “Windows_NT” ]; then
4 SVN=`cygpath $PROGRAMFILES`/Subversion/bin/svn.exe
5 else
6 SVN=svn
7 fi
8 … Snip …
9 # This does the checkout for all modules
10 checkout() {
11 if [ $OS == “Windows_NT” ]; then
12 for folder in $folders; do
13 $SVN co $URL_BASE/$folder `cygpath -w $SOURCE_DIR/$folder` || { echo error, cancel operation“; exit 1; }
14 done
15 else
16 for folder in $folders; do
17 $SVN co $URL_BASE/$folder $SOURCE_DIR/$folder || { echo error, cancel operation“; exit 1; }
18 done
19 fi
20 }
21 … Snip …

0 Responses to “Cygwin svn conflict with TSVNCache.exe”

  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: