Subversion
From FVue
Contents
Procedures
Create repository
You can use this bash syntax to create a repository with the standard directories: trunk, branches and tags:
REPOS=/path/to/repos svnadmin create $REPOS svn mkdir -m 'Initial repository directories' file://$REPOS/{trunk,branches,tags}
Moving a subversioned/checked-out project
- Make sure the old project has all local modifications committed: svn status; svn commit
- Create a new project directory with a repos subdirectory: mkdir -p new_proj/repos
- Copy the repository: cp old_proj/repos/* new_proj/repos
- Checkout the new project: cd new_proj/workdir; svn checkout file:///new_proj/repos/trunk .
- Copy the remaining files from the old project: cp -r --reply=no * ../arcproj
Undo putting (binary) files under version control
As long as you haven't committed the working directory changes to the repository, you can easily remove the (binary) files from the working directory version control.
Remember you can't use svn rm file, because this will remove the file from your working copy as well.
svn revert file
Recursive removal of .svn directories
find . -type d -name .svn -exec rm -rf {} \; -prune
Moving a file (+ history) from one repository to anothor
For example, moving the file '/trunk/foo' from repos1 to repos2.
# Dump repository svnadmin dump ./repos1 > repos1.svndump # Filter the svndump to hold the specific file as residue svndumpfilter include trunk/foo < repos1.svndump > foo.svndump # Load file into new repository (make sure its directory exists) svnadmin load ./repos2 < foo.svndump
Advertisement