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

RE: different IP addresses due to moving WCs with a laptop

From: Moretti, Giovanni <G.Moretti_at_massey.ac.nz>
Date: 2005-06-09 05:07:45 CEST

Hi Uli

> Working with a WC on a laptop, we sometimes use different IP
> addresses to access the same repository, depending where we
> are with that laptop. The problem with this setup is that
> Subversion remembers how it accessed the repository in the
> other network and refuses to cooperate in the new network.

> Currently, we solve this by tunneling the access through
> localhost and manually redirecting the tunnel depending on
> the network.
> What I wonder is whether there is a way to tell Subversion
> that nothing changed but the name/address of the repository?
> Or, even better, if there is a way to setup things so that it
> just doesn't matter what network you're on?

I've got the same problem using a repo from desktop at work, home and
from a laptop.

I've handled this by using a Fake site name so the working copy always
accessed via this name:


and then in the Hosts file (a file mapping IP Name to Numbers) put a
line like:

111.222.333.444 SVNRepoSite

or, if you want to loop it back to the PC you're currently on, either
because the repository is on that machine or you've set up an SSH tunnel
to a remote machine, use: SVNRepoSite

With this technique, it doesn't matter where the repository is as long
as it can be accessed from where you're currently working.

The Host file is located:
 /etc/hosts in Linux
 C:\WINDOWS\system32\drivers\etc\hosts - in WinXP (& I think Win2000)

you could write a little small program that let you do something like:

amAt home
amAt laptop
amAt work

which rewrote the hosts file appropriately.

Note that under WinXP, the "hosts" file is a standard text file, even
though it doesn't have the .txt extension.

This works well - transparent svn update/commits from three different
PCs (and of course, works with TortoiseSVN as well).

Giovanni Moretti | Institute of Information Sciences and Technology
Senior Lecturer | Massey University, Palmerston North, New Zealand
Computer Science | Ph 64-6-3505799x2474 == Fax 64-6-3502259 == ZL2BOI

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Jun 9 05:11:30 2005

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.