Subversion howto
Subversion access via svn+ssh:// on Windows
If you encounter difficulties with Subversion connectivity on Windows (plink not working, SSH/tunnel errors), check the page Subversion access via SSH on Windows.
Recover a deleted file or directory
Find out the revision in which the file or directory was deleted (say, 123). You'll need the revision just before that (122).
svn log --verbose | less # revisions will be listed from newest to oldestFind out the repository URL
svn infoCopy the file at that revision from the repository into the local directory:
svn copy svn+ssh://svn.example.com/path/to/file@122 ./
Merging a branch into trunk
Check out a copy of trunk:
svn co svn+ssh://server/path/to/trunkFind out at what revision the
myBranchbranch was madesvn log --stop-on-copy svn+ssh://server/path/to/branchThis should display back to you the changes that have been made back to the point the branch was created. Remember that number (should be rXXXX, where XXXX is the revision number).
Perform an SVN update:
svn upThis will update your copy of trunk to the most recent version, and tell you the revision you are at. Make note of that number as well (should say "At revision YYYY" where YYYY is the second number you need to remember).
Now we can perform the SVN merge:
svn merge -rXXXX:YYYY svn+ssh://server/path/to/branch/myBranchThis will put all updates into your current working directory for trunk.
Resolve any conflicts that arose during the merge
Check in the results:
svn ci -m "MERGE myProject myBranch [XXXX]:[YYYY] into trunk"
Simplified from http://www.sepcot.com/blog/2007/04/SVN-Merge-Branch-Trunk.
Checking out only the latest version
By default, svn checkout checks out everything:
svn checkout --revision HEAD https://svn.sourceforge.net/svnroot/netpbm/advanced netpbm
Undoing all local changes
svn revert ./ -R
Revert (roll back) to a previous version
Not intuitive at all. See How to revert (roll back) to a previous revision with Subversion.
Creating a repository
svnadmin create path/to/repo
Loading a dump file
svnadmin load path/to/repo < dumpfile
Showing changes from previous revision. Removed | Added