Svntogit is a script that allows for cloning of Subversion repositories and converting them to Git.
It consults the index of repositories, lists them and then uses either SubGit
or git svn clone
to convert them.
This script will download and convert all repositories from Subversion server from SVN to Git. In order to do that prompts for the needed credentials to access the server's repository list and catches it in HTML format. Using BeautifulSoup it filters the links for the repositories into a list. Once this first stage is done, next is the migration itself of every repository. At the end, the migration results are shown and registered into correct and incorrect files lists.
- Python 3 to run the script.
- BeautifulSoup library to filter server response to a repo list, to download it you can use
pip install bs4
. - TMate SubGit if you prefer to use the SubGit flavor of the script.
- Git to manage the cloned repositories.
- Copy the svntogit-subgit.py file into the folder you want all the new Git repositories to be stored.
- Use
python3 svntogit-subgit.py
enter your credentials and wait all the repositories to be processed.
- Download the compiled executable from the Releases section
- Alternatively, you can compile it yourself using PyInstaller.
If you don't have it installed, you can do it with
pip install -U pyinstaller
and then use it to compile the script withpyinstaller svntogit-subgit.py