Observations, musings and conjecture about the world of software and technology

SVN “Can’t create directory” Error

Here’s another one of those Subversion idiosyncrasies which threw me the other day and I couldn’t readily find an answer for. When committing a changeset I kept getting the error “Can’t create directory” followed by the the path of the repository on the server then “The system cannot find the path specified”.

image

The first thing to get clear is that this is a Subversion error, it’s not related to the local working directory nor is it related to Tortoise SVN.

imageLooking at the path in the image above, you’ll see it specifies the subdirectory “db\transactions”.  After inspecting the folder structure of the repository, I found the subdirectory was missing. Comparing it to a newly created test repository I found that not only was the "db\transactions” directory missing but so was “db\txn-protorevs”.

I’m not sure how these folders disappeared. I run a robocopy script to backup my repositories to a NAS device and although the source shouldn’t be touched, the timing is rather coincidental. Whatever the cause, the folders disappeared and this was what caused the issue.

The fix

Really, really basic; just manually recreate the folders. They don’t retain any information post-commit, they just need to exist so transactions can be established. Simple as it may be, I found vey few online references to this error and nothing around the fix so hopefully this will save someone a bit of time in the future.

BTW, small sidenote and a quick plug for some very good software; as you’ll see in the images above, this project is called “TotalBabyReport”. Total Baby is an iPhone app which tracks everything your baby does which is pretty handy when you’re sleep deprived and can’t remember what you had for breakfast let alone when the baby last slept. Or ate something. Only thing is it doesn’t do well is report on trends across time such as sleep patterns so I’ve created a little personal app to try and get some baby business intelligence metrics :)

13 comments:

James Bailey said...

Hi Troy,

I just came across your informative & helpful post here via twitter and enjoyed reading it - including the slightly random tangent at the end!

I manage a Subversion Community Site where we try to bring people together to share their views and to help those with questions - if you'd like to share your thoughts there it would be fantastic to see you :)

http://subversion.wandisco.com

Cheers,
James Bailey

Anonymous said...

Thanks for the tip!

Anonymous said...

just creating the directory didnt work for me., i just changed the user:group ownership of the /path/to/repo
#chown -R apache:apache /path(svn repository directory).

Anonymous said...

Many thanks!

Anonymous said...

Thanks! I've been Googling for a solution for over an hour.

Paul Betteridge said...

Good work and thanks for this post... had same issue and spent hours trying to get it to commit without this error... even checked out entire project again etc. Thanks

Richard Feraro said...

Thanks for the info :)

Anonymous said...

nice one, for me it was a space in the directory name that caused this error...

Richard Feraro said...

Thanks for the info :)

Paul Betteridge said...

Good work and thanks for this post... had same issue and spent hours trying to get it to commit without this error... even checked out entire project again etc. Thanks

James Bailey said...

Hi Troy,

I just came across your informative & helpful post here via twitter and enjoyed reading it - including the slightly random tangent at the end!

I manage a Subversion Community Site where we try to bring people together to share their views and to help those with questions - if you'd like to share your thoughts there it would be fantastic to see you :)

http://subversion.wandisco.com

Cheers,
James Bailey

Jverstry said...

Halluja... Really Halleluja... I was turning crazy.... Thank you sooooo much !!!

Diego Mesa said...

Thank you! My repository comes to life again!

Post a Comment