Wednesday, November 07, 2012

How to use Cygwin svn and TortoiseSVN both, or fixing " Unable to open an ra_local session to URL" svn error

I have SVN repo located in C:/SVNrepo. And I have a working copy created with TortoiseSVN.
Sometimes I need to access my machine remotely with just command line. I use Cygwin SSH for this.
Sometimes in Cygwin bash session I need to use svn command, for example to update or commit my project working copy.
Well. It did not work. :(
The cause is that Subversion stores path to repository in working copy directory .svn. Inside this svn repo path is set by a tool that created the working copy. If the working copy was created by TortoiseSVN, the repo path will be DOS/Windows path - C:/SVNrepo. Or whatever path you have, important is that it is in DOS/Windows convention, it starts with a drive letter followed by colon.
Cygwin in general can honor such pathes. However its svn utility cannot.

For example it will fail if you issue:

$ svn ls file:///C:/SVNrepo
svn: E180001: Unable to connect to a repository at URL 'file:///C:/SVNrepo'
svn: E180001: Unable to open an ra_local session to URL
svn: E180001: Unable to open repository 'file:///C:/SVNrepo'


Cygwin's svn honors only Cygwin's path convention - /cygdrive/c/SVNrepo.

$ svn ls file:///cygdrive/c/SVNrepo
 project1/
 project2/

As you can see, the repo URL has three slashes in prefix - file:///
First two belong to the prefix itself - file://. The last slash means filesystem root.
It means that when ra_local library parses the URL 'file:///C:/SVNrepo' it will take out "file://" part, and try to find '/C:/SVNrepo' directory. And, of course, it fails! - there is no such path in my system.
Despite there is C:/SVNrepo, there is no /C:/SVNrepo.

What to do?!

To create a link!

ln -s /cygdrive/c /C:

check it is created

ls -l /
...
lrwxrwxrwx   1 mark           None     11 Nov  7 14:25 C: -> /cygdrive/c
...


ensure svn likes it

$ svn ls file:///C:/SVNrepo
 project1/
 project2/

It does!
It works now!





29 Comments:

Blogger Raymond DeCampo said...

I get around this by using the Windows native svn client instead of cygwin's svn client. Add it to your Windows PATH and it runs just fine from cygwin.

7:34 AM  
Blogger Camellia Canan said...


These provided information was really so nice,thanks for giving that post and the more skills to develop after refer that post. Your articles really impressed for me,because of all information so nice.

SAP training in Chennai

11:26 PM  
Blogger Keerthi said...

This idea is mind blowing. I think everyone should know such information like you have described on this post. Thank you for sharing this explanation.Your final conclusion was good. We are sowing seeds and need to be patiently wait till it blossoms.

Online Training in Chennai

4:09 AM  
Blogger Sathya G said...

the blog is very interesting and will be much useful for us. thank you for sharing the blog with us. please keep on updating.
ROI Services in Chennai

5:38 AM  
Blogger Sathya G said...

the site contains a very great article. the information present in this site will be very useful for us. thank you for sharing the blog with us.
ROI Services in Chennai

2:25 AM  
Blogger Suseela Susiee said...






What an awesome post, I just read it from start to end. Learned something new after a long time.



Cloud Computing training in Chennai

Salesforce training in Chennai

VMware training in Chennai

AWS training in Chennai

6:20 AM  
Blogger Suseela Susiee said...



What an awesome post, I just read it from start to end. Learned something new after a long time.



SAP ABAP training in Chennai

SAP FICO training in Chennai

SAP MM training in Chennai

SAP SD training in Chennai

1:54 AM  
Blogger Hammed said...

your blog is very interesting to see..thank you for share your blog to public....i read full content from your blog some points are nice to see..




digital marketing company in india

11:50 PM  
Blogger Jeffy said...

Thank you for sharing such a nice and interesting blog with us. Hope it might be much useful for us. keep on updating...!!
seo company in india
digital marketing company in india
seo company in chennai
digital marketing company in chennai

6:51 AM  
Blogger sunitha vishnu said...

It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
Android Training in Chennai
Ios Training in Chennai

1:03 AM  
Blogger kalpana said...

your blog is interesting..i'm happy to read this blog..thanks for your information.

Hadoop Training in Chennai

3:49 AM  
Blogger kayal M said...

These ways are very simple and very much useful, as a beginner level these helped me a lot thanks fore sharing these kinds of useful and knowledgeable information.

Herbal Shampoo
Dandruff Treatment
Antifungal Cream
Vitiligo Medicines

11:34 PM  
Blogger adarsh k said...

This information is very useful for me. i really like this blog.And i got more information's from this blog

Python Training in Chennai

4:33 AM  
Blogger thenmalar M said...

This blog is very intresting to see..
best-architects-in-chennai

9:14 PM  
Blogger stella V said...


I fell happy that, I am not waste my last few minutes.
Transportation Consulting Chennai

9:58 PM  
Blogger haruthra ruthra said...

This blog site is very useful and i am sure that i got atleast some knowledge about this.
Industrial Architecture

10:54 PM  
Blogger vijay ck said...

These information very useful for us..
Digital Markteting

3:55 AM  
Blogger stella V said...

atlast i havnt with last few minutes....... im new to blog.... ur blog full of informative...... thanks for that... i gonna share this to my friendsss




Transportation Consulting Chennai
civil engineering consultants
Office Interiors in Chennai
Rainwater harvesting chennai

1:50 AM  
Blogger chaithanya 4414 said...

This information will be helpfull..
SAP Basis Training in Chennai

11:34 PM  
Blogger fitness healthknowledge said...

hey i'm Abhi
Really nice blog keep growing man
Blood cancer

2:27 AM  
Blogger Valli G said...

Information very useful for me.....

seo

10:27 PM  
Blogger chenna sankar said...

This information very usefull....

VMware Training in Chennai

8:46 PM  
Blogger chenna sankar said...

Learned something new after a long time.


Hadoop Training in Chennai

9:48 PM  
Blogger Tamil said...

This information is very useful for me...
Best sap basis training in chennai

10:39 PM  
Blogger Ancy merina said...

Its very great blog, Keep sharing more updates.
Best website designers in bangalore
Ecommerce Website Design and Development Companies in Bangalore

1:33 AM  
Blogger Sopiya lla said...

Thanks for the informative article. This is one of the best resources I have found in quite some time. Nicely written and great info. I really cannot thank you enough for sharing.

Shriram Magizhchi
Shriram Magizhchi Guduvancheri
Shriram Magizhchi Price
Shriram Magizhchi Chennai
Shriram Magizhchi Apartments
Shriram Magizhchi Flats
Shriram Magizhchi Review

5:24 AM  
Blogger nitin shah said...

Thanks for the informative article. This is one of the best resources I have found in quite some time. Nicely written and great info. I really cannot thank you enough for sharing.

Wellnesscentres in Chennai
Herbalife in Chennai
Weightloss in Chennai
Weightgain in Chennai

12:51 AM  
Blogger ezhil arasi said...

All the latest updates from the PythonAutomationminds team. Python Automationminds lets you program in Python, in your browser. No need to install any software, just start coding straight away. There's a fully-functional web-based console and a programmer's text-editor
Phyton training in Chennai

6:53 AM  
Blogger Gagana Vaijayati said...

Benefits of reading your post. this may facilitate within the maintenance of our health.The daily routine can assist you lose weight quickly and safely.My life is completely reworked once I followed this diet.I feeling nice concerning myself.

Herbalife in Chennai
Wellnesscoaches in Chennai
Weight Loss in Chennai
Weight Gain in Chennai

10:22 PM  

Post a Comment

<< Home