Using SVN on Windows with Cygwin and TortoiseSVN
Solution 1
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.
Solution 2
There is a better way. Simply link the directory.
ln -s /cygdrive/c /C:
now it should work.
Credit goes to Mark Malaknov You can read it here:
http://markmal.blogspot.com/2012/11/how-to-use-cygwin-svn-and-tortoisesvn.html
Solution 3
If you (re-)install TortoiseSVN and select the option to install the (Windows) command-line tools, but don't install the Cygwin/Linux version of these tools from the Cygwin installer (or remove them), then your Windows tools will still be available via Cygwin.
These should accept Windows paths as if you were invoking them from the Command Prompt (although you might have to put them in quotes to avoid the bash shell from interpreting them)
Czechnology
Updated on June 04, 2022Comments
-
Czechnology almost 2 years
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!
-
Czechnology almost 12 yearsThank you, David, I'll definitely take a look into it. In the meanwhile, I just used the subversion from windows command prompt which works well with Tortoise.
-
Rob Gilliam over 10 yearsNote: I've not tried this with a local repo myself; I prefer to run a local server as per David's suggestion - I usually just drop VisualSVN onto the windows box and set the repos up in that.