Here is the problem: We have all of our development under subversion, but our beta versions are just mish-mashed bits of exported files that were not all put there at the same time. Or, to put it another way, we make our changes to versioned files, and then when we think we are happy, we manually export them by simply copying them to a different directory.
Well, we would like to have the whole works managed by Subversion, with the beta version as a simple working copy of the head of the trunk. I know that I can start with the trunk head, and simply roll back specific areas until I reach the same files, but it would be nice to know what revision each file needs to get rolled back to.
Does such a tool, that will take a set of files/directories and compare it to a repository, giving revision numbers for each file/directory, exist? If not, how would I go about putting a script together to do this?
I sympathize with your problem, but this is a problem you’re going to have to solve in a different manner for the future.
Subversion has a notion of ‘copies of a directory’ which are lightweight and doesn’t occupy much space in the repository at all.
Typically, if you use the often used layout of tags/branches/trunk, then you would make a copy of your trunk into a new sub-folder of your tags directory when you release something.
That way you wouldn’t have to try to figure out what version each file was after the fact, Subversion would track it for you.
This is pretty much like saying ‘I know I drove my car into a rock wall, but could you please help me put the car back together?’. The answer is of course to avoid driving into the rock wall to begin with.
As far as I know, there is no function in Subversion that will tell you which version of each file that your on-disk files look like, so either you make some scripts that tests version-by-version for each file, or you do it manually.
Oh, and yes, avoid driving into that rock wall in the future.