Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using SVN on Windows with Cygwin and TortoiseSVN

I'm quite a beginner with version control so I might be doing something very wrong.

I want to be able to access a local repository both in cygwin and in TortoiseSVN (or other Windows app). The trouble is, in cygwin I have to use the
file:///cygdrive/c/... paths while TortoiseSVN needs
file:///c:/....

How can I make these two work together? Can I use some other path/protocol that both understand?

Thanks!

like image 855
Czechnology Avatar asked Dec 27 '22 21:12

Czechnology


1 Answers

Easy way is to use the svnserve program that comes with Subversion. This should be in Cygwin. All you need to do is start up the svnserve and use svn:// as the protocol instead of file://.

First, you need to modify your repository. You'll have to edit two files: svnserve.conf and passed.

$ cd /cygdrive/c/.../repos_dir
$ cd conf
$ vi svnsever.conf   # Change the "# password-db = passwd" line & remove the "#"
$ vi passwd          # Setup the user and password entry

Next, you start the server:

$ cd ..    # Back to the repository directory
$ svnserve -r $PWD -d

And, that's it.

Now, you can do your checkout this way:

$ svn co svn://localhost/dir/to/check/out

This will be the same URL in both cygwin and in Tortoise


WORD 'O WARNING

There is no guarantee that different subversion clients will produce working directories that will work with other subversion clients.

Fortunately, Tortoise and the standard Subversion command line client seem to be okay. I've been able for the last few years to switch between the Subversion command line client and ToroiseSVN. HOWEVER, you do have to make sure that they're both ether post version 1.7 clients or pre 1.7 clients. If your Cygwin client is version 1.6.7 and your Tortoise client is 1.7.5, you can't share the working directory. Use the svn version command to check your Cygwin client, and check the About Box on Tortoise.

Again, there's no guarantee that both clients can share the same working directory, so if there are problems, you are on your own.

like image 73
David W. Avatar answered Jan 04 '23 04:01

David W.