background: DynDNS has now started to require a once a month logon to keep their free accounts active (previously you only had to renew your IP address once a month). I am sure sooner or later I will forget to do that and lose my account.
I use mysvn.dyndns.org for accessing my subversion repository on a server which can (as of now) also be reached by svn.mydomain.com. Unfortunately most projects also refer to externals which are also located at mysvn.dyndns.org and I don't really want to go through all projects (>100) and change the externals, because that would probably take several hours and is rather error prone.
Is there any way to configure Windows or the subversion / TortoiseSVN clients to redirect one domain to another?
e.g.:
https://mysvn.dyndns.org/svn/blablub
should be redirected to
https://svn.mydomain.com/svn/blablub
I know that I can add an entry to hosts to redirect to an IP address, but I would prefer redirection to a domain name.
You (really) asked 2 related questions:
somename.domain.com
to anothername.somedomain.com
?And short answers will be
Longer versions
For redirecting old hostname to new you have and can use at least two variations (with the same final result)
somename.domain.com. IN CNAME anothername.somedomain.com
on request of somename will answer with data from anothername
But: it will work only on browsers's level - when you'll try to use this redirected location as target for any Subversion's command, you'll get error "Repository moved, please relocate" and you must relocate all old resources to new URL.
Good news for your
All externals definition are written as svn-properties inside source repo, you can get list of these externals (with values) and update with the new values, and this operation (theoretically) can be automated
svn propget -R svn:externals . > FILE
in the root of working copy for getting externals
svn propset svn:externals --target FILE
for defining new externals in batch
Can I suggest an alternate approach?
Assuming you're using svn 1.5 or higher which supports relative URLs for externals, following one of the approaches in this question to change all externals to relative would solve the more fundamental problem.
And if they are not all relative URLs, you can change them from server1 to server2 using a similar script. This is done routinely during server migrations. Assuming you keep good backups, it's probably the approach that will let you get all the pain resolved at one time rather than deferring it over time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With