I wrote a deployment tool for my own programs based on SQL and Subversion.
I'm able to create different versions of applications and store them with Subversion while the information for those is stored in SQL.
Until my "deployment tool" worked quite fine but now I found a problem.
When creating a version of an application I checkout the head revision and visualize this in my program. The latest version can then be edited by deleting, renaming, adding or overwriting files and folders.
Say, if I have the following tree structure in my working copy:
- ProgramFiles
- Assemblies
- Data
- Type 1
- ...
- Type 2
- ...
- Type 3
- ...
I want to replace one directory (Data). This calls svn delete and after that Directory.Delete, because "svn delete" just marks the folders for delete when you do a commit.
Now I want to add a folder named "Data" again with new subfolders and files but then I get an exception "working copy admin area is missing".
As far as I can tell the problem is that the directory .svn under ProgramFiles stores information that the folder Data shall be deleted an if I read this folder it crashes.
I also know that I can commit before adding the folder but that would increase my revision number with a "non stable version".
How can I solve this problem?
Well, after I've thought about the problem for a while assuming that it's impossible to do what I'm trying to do here I had an idea.
What I'm actually trying to do, is working an that working copy that means exchanging, deleting, moving adding and so on. All those changes shall be visualized in my program. (based on the folder structure on the filesystem)
All those changes should not be commited until the user wants to save it as a new "packet". This indicates that he may cancel the progress and nothing is commited neither changed.
I know tried a workaround doing an export first. Editing those folders and files. When I am now ready to commit, I checkout the same path, delete all those things that don't exist in working copy and add all new files from export into the working copy.
It's only a workaround but the only thing that comes through my mind.
Is there a method in subversion doing something like that? My workaround is running only half as fast as before, because of that export and checkout instead of only checking out the program.
Also the comparison of both folders is really complicated. Does anyone know a solution to simplify this?