Giter Site home page Giter Site logo

openvas-convert-to-git's Introduction

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

$EDITOR <config file>

Add the following variables to the config file

USERNAME=<username for svn repo access>
MODULE=<module name e.g. openvas-manager>
TAGS_MODULE=$MODULE # name may be different from $MODULE
BRANCHES_MODULE=$MODULE # name may be different from $MODULE
GIT_REPO_PATH=<path to created git repo> # e.g /path/to/manager-git

See Example Config for details and options.

2. Run init script

/path/to/convert-repo/init.sh /path/to/<config file>

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.

cd <path to created git repo>
$EDITOR authors-transform-<module name>.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.

cd <path to created git repo>
$EDITOR .git/config

5. Run

/path/to/convert-repo/convert.sh /path/to/<config file>

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.

source <path to config file>
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.

git branch -m <name>-<x>-<y> <name>-<x>.<y>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.