#!/bin/sh

set -e -u
cd "$ADTTMP"

# create a repo and populate it with a commit
svnadmin create repo
svn co file://$PWD/repo/ repo-wc
(
    cd repo-wc/
    svn mkdir trunk branches tags 
    svn ci -m "Make structure"
    echo foo > trunk/bar
    svn add trunk/bar
    svn ci -m"Initial commit"
)
svn cp file://$PWD/repo/trunk file://$PWD/repo/tags/1.0 -m"Tag 1.0"

# Try to convert the svn repo to git
cp /usr/share/doc/svn-all-fast-export/examples/standardlayout.rules .
svn-all-fast-export --rules standardlayout.rules repo --debug-rules 2>&1

# And see if git likes what it sees
cd myproject/
git log
