|Version 11 (modified by moorman, 5 years ago)|
Managing your Subversion Repository with adminrepo
While most changes to a SCM repository? are made through client software on your workstation, most repositories have a certain set of operations which must be performed through direct filesystem manipulation on the server. To meet these needs for direct repository modification, SourceForge.net provides the adminrepo tool. adminrepo may be used to perform common tasks, such as permanently removing files that were incorrectly checked in.
Before you start
NOTE: Before performing ANY action with adminrepo:
- Consult with your Project Team; ensure all developers are aware of the changes you are making to the repository. Direct repository changes can result in lost data and lost time for your developers if done improperly.
- Make a backup of your repository. The backups maintained by SourceForge.net are used only when there is a catastrophic server failure. If you break your repository using adminrepo, we won't restore the data. You need to be prepared to restore data using a backup you are making now.
rsync may be used to make a backup of your repository. For example (replace PROJECTNAME with the UNIX group name of your project):
rsync -av PROJECTNAME.svn.sourceforge.net::svn/PROJECTNAME/* .
adminrepo --checkout svn will clone a copy of your repository in /svnroot/PROJECT. Once you have a clone copy, you are able to manipulate the repository as you would normally. adminrepo locks your repository until you either finalize or cancel your changes, with the adminrepo --save or adminrepo --discard respectively. While your repository is locked, it is read only.
Removing a file
- Discuss your proposed changes with your Project Team.
- Backup your your current Subversion repository.
- Connect to our Shell service and run the sf-help command. This will provide you with the information necessary to upload your dump file.
- adminrepo --checkout svn will create a clone copy of your repository in /svnroot/PROJECT.
- Use adminrepo --help for further information.
- Create a dump file of your repository with svnadmin dump /svnroot/PROJECT/ > svndump
- Use svndumpfilter to make your desired changes, eg. removing a file.
- Create a new repository to load the changes from your dump file into:
- Remove the working copy of your repo with rm -rf /svnroot/PROJECT/*. Be very careful with this.
- Create a new repository with svnadmin create
- Use svnadmin load /svnroot/PROJECT < svndump to load your changes into the repository.
- Save your changes using adminrepo --save.