Page 1 of 1

SVN repository in shared directory

Posted: 23. Jun 2010, 16:00
by dziadgba
Hy,

I use a host windows 7 system which has an automatic Backupsoftware running.
In order to backup svn repository which I am using in the Ubuntu Guest System I created the SVN repository in the mounted shared folder.
I can read and write the shared folder from ubuntu as well as from windows 7.

Creation of the repository with

Code: Select all

svnadmin create /home/dziadgba/host/
works fine.
But when I try to import:

Code: Select all

svn import /home/dziadgba/mb/ file:///home/dziadgba/host
Adding         /home/dziadgba/mb/trunk
Skipped '/home/dziadgba/mb/.svn'
Adding         /home/dziadgba/mb/branches
Adding         /home/dziadgba/mb/tags
svn: Can't read directory '/home/dziadgba/host/db/transactions/0-0.txn': Partial results are valid but processing is incomplete
svn: Your commit message was left in a temporary file:
svn:    'svn-commit.4.tmp'
... a error is diplayed.

Repeating the same procedure on a normal folder in linux (not shared) works fine.

Somebody has an idea what I am doing wrong?

thanks
dziadgba

Re: SVN repository in shared directory

Posted: 23. Jun 2010, 23:42
by Sasquatch
I've seen other users with SVN problems in combination with Shared Folders. For some, a check-out of an SVN repo fails when the destination is an SF. I however wasn't able to reproduce that problem.
As a work-around, I would suggest that you use a local SVN repo that you sync every x minutes or so (or when you make an update) to a shared folder for your Host backup system.

Re: SVN repository in shared directory

Posted: 24. Jun 2010, 15:43
by dziadgba
Thanks! I followed your hint.
Maybe somebody is interested in how I proceeded:

1) install unison (program for file syncronisation)

Code: Select all

apt-get install unison
2) create profile file svnTohostsvn containing directories to be synchronised

Code: Select all

# Unison preferences file
root = /home/dziadgba/svn
root = /home/dziadgba/host/svn

3) Script containing commands "mySync"

Code: Select all

unison svnTohostsvn -perms 0 -batch -log -logfile /home/dziadgba/.unison/myLog
echo "Syncorization Successful: $(date)" >> /home/dziadgba/.unison/myLog
4) The script has to be called periodically

Code: Select all

crontab -e
adding following line:

Code: Select all

30 13,19 * * * /home/dziadgba/.unison/mySync
(do not forget to put a new line)

Now the local folder svn will be synchronised with the shared folder host/svn twice a day at 13:30 and 19:30