Skip to content

Instantly share code, notes, and snippets.

@tfwio
Created August 19, 2014 17:33
Show Gist options
  • Save tfwio/6fdf8dadb4a44a3513e9 to your computer and use it in GitHub Desktop.
Save tfwio/6fdf8dadb4a44a3513e9 to your computer and use it in GitHub Desktop.

SVN Berkley DB Upgrade

This concept is also known as SVN repository upgrade from v1.6.x to v1.7.

The note is written for an archive I created and have up on my drive.google.com, with some ammendments to this readme for the passer-byer...

Requirements

  • svn-win32-1.6.15.zip --- download
  • once downloading, extract to the location of this readme and batch-file so that you have a directory layout will appear somewhat as follows.

DIRECTORY LAYOUT

.\svn-bdb-upgrade-win\readme.md
.\svn-bdb-upgrade-win\rebuild.cmd

.\svn-bdb-upgrade-win\svn-win32-1.6.15\
.\svn-bdb-upgrade-win\svn-win32-1.6.15\...
.\svn-bdb-upgrade-win\svn-win32-1.6.15\bin\

Usage

  • this is a drag-drop operation.
  • In Explorer, load the parent directory to your respsitory; This directoy contains your repository in the list-pane.
  • Note that you should be sure the path is not too long, or is otherwise dos-compatible. In other words, you may want to move or copy the repo of interest to somewhere like: c:\repo\[my-archive].
  • In another Explorer folder, load the directory containing the rebuild.cmd command-script provided in the same directory as this readme.
  • A directory named new_repo will be created parallel to your repository, so if a directory with the same name exists, then you will need to either rename it, or update the NREPO variable in the command script to be reflected.
  • Drag your repository directory into the command script.
  • Once the command is complete, you can delete the binary-dump.
@echo off
:: INPUT DIRECTORY
@set DIR_IN=%~dpn1
:: Binary Output
@set BIN_OUT=temp.bin
:: repository name
@set NREPO=new_repo
:: make a new repo directory
@md "%NREPO%"
:: add svn-bin to path
@set path="%~dp0svn-win32-1.6.15\bin";%PATH%
@echo IN %DIR_IN%
@echo OUT %BIN_OUT%
@echo NREPO %NREPO%
@echo %~dp0svn-win32-1.6.15\bin
echo.
@echo press a key to continue
@echo -------------------------
echo.
@pause
@cls
:: dump the old repo to a binary file
svnadmin dump "%DIR_IN%" > "%BIN_OUT%"
:: Create empty repo
svnadmin create "%NREPO%"
:: Import Binary
svnadmin load "%NREPO%" < "%BIN_OUT%"
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment