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.
synchronization repository svn mirroring
rmeador Feb 18 '09 at 19:54 2009-02-18 19:54
source share