[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Repository on a portable hard disk

From: Ryan Schmidt <subversion-2006c_at_ryandesign.com>
Date: 2006-08-22 13:38:05 CEST

On Aug 22, 2006, at 01:53, Andreas Thuy wrote:

> I am new to Subversion and working with the book (which is really
> good) up to the administration chapter now. I want to create a
> repository on a portable hard disk (connected via USB) so that I
> can take it with me to different locations. As there is only me
> working on the files I would be glad if I could avoid setting up a
> server for this purpose (which should not be necessary in such an
> arrangement, from my point of view).
>
> My question is, if I run into problems on windows machines if the
> hard disk is mounted at different locations on different computers
> (for example g:\ and e:\). Checking something out on different
> computers could be done easily by applying changes to the URL
> accordingly. If the complete path is used by Subversion to maintain
> the structure of the repository, then I probably have to find
> another way...

Yes, what you want should be possible. Now, do you also plan to have
your working copies on this USB drive, or only the repository? If
only the repository, and the working copies are on the hard drives of
the various computers to which you attach the USB drive, then there
is no problem, because presumably the USB drive would get the same
drive letter each time it is connected to the same machine, and the
working copies on that machine would use that drive letter. But if
you plan to have your working copies on the USB drive also, then yes,
there is the problem you suspect, because Subversion does store the
complete path to the repository within the working copy, and on
Windows, if you're just using the file:/// protocol without setting
up a server process, that would include the drive letter. So if you
move the USB drive to a machine where the drive is mounted with a
different letter, you would first have to use "svn switch --relocate
A B" where A is the drive letter on the last machine on which you
used the working copy and B is the current drive letter on this
machine. If your working copy isn't ridiculously huge then the
relocation should not take long to do. And if you forget to relocate,
you'll get an error message when you commit, which will remind you to
relocate.

If all the machines to which you connect the drive run the same
operating system, you could think about putting binaries for
Subversion on the USB drive as well, and actually running svnserve
(or even Apache) from the USB drive, so that the repository URL is
always the same. Um... well, that's complicated by the fact that then
svnserve (or Apache) would need to be told on which drive letter the
repository is.

Maybe one of the above solutions could be automated with some kind of
script, where you attach the USB drive, then run a "start" script,
which would determine by some means what drive letter it's been
assigned and then automatically relocate any working copies.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Aug 22 13:40:02 2006

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.