If there is one thing I do with every new subversion repository, its create the standard layout of: trunk, tags, and branches. Then, I import any existing project files, if any exist. I’ve lost countless hours to this little dance. This script automates this process.
Here’s how it works:
First, it asks you for the URL of your new subversion repository. Then, the name of the folder you want your working copy to exist in. If that folder already exists it backs it up, then imports its contents into the trunk folder of the repository. Once that’s complete, it will remove the folder. Finally it performs a check out of your repository from trunk into the working copy you specified (regardless of whether or not you had a folder to begin with).
To Use:
- Unzip and stick the script somewhere in your PATH.
- Make the script executable: chmod +x newrepos
- Run newrepos from the directory where you want the working copy to be created (or pass a full system path to the file).
comments