Short Notes on SVN
Contents
Simple Guide to SVN Client
Bullets on how to use SVN client.
Creating a SVN Repository
How to create a new SVN repository to serve using svnserve, via svn+ssh or via Apache.
Moving a SVN Repository
Moving complete SVN repository from one host to another.
Change Repository URL (Subversion 1.7+)
Few days ago I've migrated among servers, and along the way had to rename the user used via ssh to serve SVN.
The problem - URL of all repositories has changed. It's either endless diff, checkout, patch, or ... dig into the SVN checkout and edit the repo URL!
Pre-1.7 this was pure horror, as the URL was in every .svn/entries file in every folder. Twice. So, you had to pretty much do your awk magic on find results.
Subversion 1.7 introduced something magical - centralized metadata in SQLite DB.
Now, to change old_url to new_url simply go to the root of your checkout, and
--- open the metadata DB $ sqlite3 .svn/wc.db --- check the repository table; with no externals, this contains just one row sqlite> select * from REPOSITORY ; --- change the URL sqlite> update REPOSITORY set root = 'new_url' where root = 'old_url' ;
Of course, if there is just a single row in the repository table, you can leave out the where clause.
How to setup SVN hosting (via svn+ssh) if you're on a shared hosting client - no root access.