I am trying to automate the process of creating new projects from existing projects using scripts. My initial idea is that there should be two scripts:
1: check out an existing project from the svn repository and then rename it (i.e. search and replace from ExistingProjectName => NewProjectName in all files, then "svn rename" all files and directories containing the string ExistingProjectName)
2: after the user has checked the compilation, etc., create the new project on the repository (e.g. using the "svn switch" command)
The idea was that the repository should not be altered until the user has had a chance to carry out checks.
However, a potential risk has been pointed out to me. After #1 is run, the local working copy is still associated with the existing project. Somebody who carelessly commits at this stage will mess up the existing project.
Can anybody think of some svn tricks which can stop the user committing after #1? I cannot think of anything even after going through the documentation.
Thank you.
Andy
(If it is not possible to stop the committing, then we will need to go with the lesser of two evils, and write the script so that it will update the repository before the user has a chance to check.)