https://github.com/bjoernricks/openvas-convert-to-git
Convert OpenVAS SVN Repos to git
https://github.com/bjoernricks/openvas-convert-to-git
Last synced: 8 months ago
JSON representation
Convert OpenVAS SVN Repos to git
- Host: GitHub
- URL: https://github.com/bjoernricks/openvas-convert-to-git
- Owner: bjoernricks
- License: gpl-3.0
- Created: 2017-09-16T12:27:45.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-09-22T10:20:11.000Z (almost 9 years ago)
- Last Synced: 2025-01-22T21:29:54.957Z (over 1 year ago)
- Language: Shell
- Size: 30.3 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Scripts to convert OpenVAS SVN repos to git
The available scripts are using git-svn for converting the svn repositories to
git. This procedure doesn't require file access to the svn server. To install
git-svn on Debian based systems run
```
apt-get install git-svn
```
## Steps to convert an OpenVAS module to a git repository
### 1. Create a new config
```sh
$EDITOR
```
Add the following variables to the config file
```sh
USERNAME=
MODULE=
TAGS_MODULE=$MODULE # name may be different from $MODULE
BRANCHES_MODULE=$MODULE # name may be different from $MODULE
GIT_REPO_PATH= # e.g /path/to/manager-git
```
See [Example Config](config.example) for details and options.
### 2. Run init script
```
/path/to/convert-repo/init.sh /path/to/
```
### 3. Update created authors file
If you are not already using an existing authors transform file the svn
user names should be mapped to real names.
```sh
cd
$EDITOR authors-transform-.txt
```
### 4. Check and adjust generated git config
Check the generated settings at the git config for svn tags and branches. It
is possible to user wildcards for branches and tags instead to list all. Also
you may add several branches and tags variables.
```sh
cd
$EDITOR .git/config
```
### 5. Run
```sh
/path/to/convert-repo/convert.sh /path/to/
```
### 6. Finished
Afterwards you will get to repos `$GIT_REPO_PATH` and `$GIT_REPO_PATH.git`
The `$GIT_REPO_PATH.git` path contains a bare repository that can be used as a
master.
### 7. Optional cleanup
Sometimes git-svn creates xyz@revsion tags and branches during conversion. You
can delete those branches and tags.
```sh
source
cd $GIT_REPO_PATH.git
/path/to/convert-repo/delete-at-refs.sh
```
Also some older branches may use `-` in their version. These branches should
be renamed.
```sh
git branch -m -- -.
```