Mirroring a subfolder between two rewritable SVN repositories

I have a situation with which I am trying to cope with the participation of my SVN server. We store all our important code on a locked server (we will call it the "dev" server). There are some files that need to be edited by users outside the corporate network, so we have another SVN server (the β€œglobal” server), which is accessible outside the firewall and contains copies of these directories containing files that are needed from the outside. If that matters, the global server folder structure is a subset of the dev server (i.e., these are just a few files / directories, but they all have the same relative paths, etc.). I included a brief explanation of why we are trying to do this at the end of the message, if you want to read it, but trust me, this needs to be done on two separate servers.

At first glance, svnsync seems ideal for this job, but it has an unsuccessful problem requiring it to be the only modification to the destination repository. Obviously this will not work as our dev repository is heavily used.

It seems to me that there are two solutions, and none of them is a good solution. I hope someone can help me set up one of them, or rather, provide an alternative.

  • My first idea is to use external resources in a dev server, but this has some problems. First of all, the external will follow the revision of the chapter (we don’t want to point it to a specific revision, since this will win the point), and therefore, if we pull up the old versions of dev-repo, the externals definitions will still point to the head of the global repo, and not to the fact that the global repo looked like in the era of our old revision - in this way, we will not be able to recreate the old issues, just checking the old revision.
  • Another solution is for the cron job to periodically export the latest revision from the global repo and overlay these modified files on the working copy from dev-repo, and then commit the changes. This overlay and commit step is likely to be done using the svn_load_dirs.pl script that comes with SVN. Ideally, this could be done as binding the post-commit to the global repo, but again, for the reasons of the firewall, the global server will not be able to access the dev server, so it should be executed by the machine inside the firewall (possibly by the dev server machine itself). The approach has its drawbacks: the dev server may be out of date as long as the interval on the cron job, and if someone accidentally makes a change on the dev server, their change will begin. (as an aside, if someone could come up with a bidirectional synchronization method, that would be awesome!)

I am currently leaning towards option 2 because it seems to bring me closer to what I need, but it is still a pretty bad option. It is also essentially what we are currently doing, with a person instead of a cron. I apologize for the long post. Thank you so much for any help you can provide.

Explanation of the reason: We need these shared files in order to exist in the dev server hierarchy, because they are an essential part of our software, therefore their assembly, testing, etc. must have them. I cannot expose the dev server through the firewall - I tried to convince authorities that were and could not. I made it clear to decision makers that having two separate servers for this does not mean that SVN is for use and that there are likely to be problems. To alleviate some of the problems we have foreseen, only the global server will be writable. The encoding of the Dev server files will be conceptually read-only (changes only when the synchronization from the global server changes), but I don’t think I can actually apply this read-only policy with SVN access controls, because some of the files in this directory structure will not exist in the global repo and therefore should be editable in dev, so I cannot blindly do this read-only. A read-only installation based on each file seems unattainable, as there are hundreds, and they are often added and removed.

+2
synchronization repository svn mirroring
Feb 18 '09 at 19:54
source share
2 answers

You can try to configure the proxy server for recording so that all records in your shared repository are automatically forwarded to the closed server.

I have never done this, but here is the documentation on this.

+1
Feb 18 '09 at 20:16
source share

Instead of getting complicated here in source control, it might be advisable to separate the two repositories (removing the code that lives globally from dev) and then the dev assembly is consumed by the global assembly. Since your inner people will be able to communicate with both, and having the same code in both cases forever is difficult.

You did not mention language related tools ... so it's hard to figure out how this would fit. Think about how to globally publish the artifact (s) and then build a global solution to this dependency.

One thing that you did not mention in Alternative 2, you will lose the audit trail, since the user who commits global will not be the user who imposes and commits to dev.

+1
May 23 '13 at 3:37
source share



All Articles