seanism DOT com Random thoughts from the world of seanism

8Feb/110

Migrate a Repository Subfolder to Another Repository

If you have a subfolder that you'd like to migrate from one repository to another SVN has some built in tools that allow you to do that.

  1. Open a command prompt and point it to the directory SVN is installed.  For Windows that is C:\Program Files\VisualSVN Server\bin.  The default Repository directory is C:\Repositories.
  2. Type: svnadmin dump "path to Repository" > repoDumpFile.dmp
  3. You'll then to filter out everything but the sub directory you want to migrate.
    Type: svndumpfilter include "Path to Subfolder" < repoDumpFile.dmp > Filtered-repoDumpFile.dmp
  4. The above command will include all revisions even those not relevant to the subfolder you are migrating.  If you'd like to remove the non relevant revisions and/or re number them you can use the below command instead of the above.
    Type: svndumpfilter include "Path to Subfolder" --drop-empty-revs --renumber-revs < repoDumpFile.dmp > Filtered-repoDumpFile.dmp
  5. Let's create the new Repository.
    Type: svnadmin create "Path to Repositories\New Repository Name"
  6. Now we import the file.
    Type: svnadmin load --ignore-uuid "Path to Repositories\New Repository Name" < Filtered-repoDumpFile.dmp

References: http://svnbook.red-bean.com

16Oct/101

TortoiseSVN and Error 403 Forbidden

A client of mine was using TortoiseSVN and was having difficulty committing a change to the repository.   Below is a similar error message to the one he was getting.
svn: Commit failed (details follow):
svn: MKACTIVITY of ‘/foobar/!svn/act/1f177b34-1601-0010-84ad-c180bd3a7ab5′: 403 Forbidden (http:/svn.foobar.com)
The issue is that Windows is case INSENSITIVE but SVN is case SENSITIVE.
In TortoiseSVN right click the checked out folder and 'Relocate' to the case SENSITIVE path.
IE https://contoso.com/repo -> https://contoso.com/REPO
We were using TortoiseSVN and VisualSVN Server.