I have a process that updates the contents of a folder by deleting the entire folder, re-creating it, and then populating files. Unfortunately that deletes the .svn folders which makes svn unhappy. What process can I use to delete a folder, write some files, and then tell svn to reconsile the differences (i.e. recognize that I’ve created some files with the same name but updated contents, some files no longer exist, new files have been added)? The solution should work for subfolders as well, since those will be delete/recreated in the process.
Share
A bit confused what you’re looking for. If you have a process that creates the folders and data, why store the folders and subfolders in Subversion? Subversion should be only for source and not generated content.
I wish there was a bit more explanation what you’re doing and why.
We had someone use Robohelp to maintain the HTML files we had in our source code. Robohelp generates HTML files from MS-Word documents. When it does a regeneration, file names, sizes, and directories could change even with the most minor of changes. The old method was deleting everything and readding it back in. That was difficult for the tech writers to do and generated thousands of changes in a single Subversion revision.
In the end, we stored the Word doc files in Subversion. The generated HTML was removed. However, we did store a single ZIP containing all the HTML (since our Unix build process couldn’t generate the HTML from Robohelp). When a new set of help files were regenerated, the Tech writers simply zipped it up and replaced the zip file in our Subversion repository. No more massive adds and deletes.
Are you attempting to synchronize work someone is doing out of Subversion into Subversion? For example, someone downloads the files via
svn export, does their work, and it’s your job to check in all the changes. In that case, you should write a little script to go through and compare everything in directory #1 to everything in directory #2 and make the changes that way. I believe we did this in three passes. First time, deleting everything in Directory #1 that’s not in Directory #2, then adding everything in Directory #2 that’s not in Directory #1. And, finally doing a comparison of all files in directory #1 and directory #2 and committing these changes.