In our company we have a tricky environment where people work in several countries. For performance reasons (network access) we would like to replicate our SVN repositories using the following scheme.
Let's say we have French people and German people:
In my application I would like to:
Is there any way to do it using SVN ? Any other ideas ? It's not possible to switch to GIT or another version control system. Thanks!
Here is how I achieved to do it in the end:
svnsync
command to propagate any commit from master to slave repositoriessvn relocate
command to do it before and after each operation that would do something in the remote (commit, create branch, share, ...)In the application:
ping
. As I'm writing Java code, I did write my own way to find the ping valuepublic static Duration ping(String host) {
Instant startTime = Instant.now();
try {
InetAddress address = InetAddress.getByName(host);
if (address.isReachable(1000)) {
return Duration.between(startTime, Instant.now());
}
} catch (IOException e) {
// host not available, nothing to do here
}
return Duration.ofDays(1);
}
svn relocate
before the operation, and another svn relocate
after the operation to get back the the faster SVN clone repository.