X-Git-Url: http://xvm.mit.edu/gitweb/invirt/scripts/git-migration.git/blobdiff_plain/573f4f05e544af781e596b827b22b4047e2cfe94..10ed6d7836c7454b9ef2e4952b3c5779486dfd05:/git-migrate-fast.sh diff --git a/git-migrate-fast.sh b/git-migrate-fast.sh index 9835e8e..f3bfd54 100755 --- a/git-migrate-fast.sh +++ b/git-migrate-fast.sh @@ -3,8 +3,9 @@ set -e # Depends: python-yaml, python-mako # and svn-all-fast-export, which comes from git://repo.or.cz/svn-all-fast-export +# (except you actually want git://andersk.mit.edu/svn-all-fast-export localtime) # and builds with `qmake && make` with -# Build-Depends: qt4-qmake, libqt4-dev, libsvn-dev +# Build-Depends: libqt4-dev, libsvn-dev # Usage: ./git-migrate-fast.sh [svn-uri] # Exports into new subdir ./git . @@ -17,7 +18,7 @@ mkdir git cd git sed -n 's/^create repository // p' ../rules | while read repo; do - mkdir -p "$repo" && GIT_DIR="$repo" git init --bare + mkdir -p "$repo" && GIT_DIR="$repo" git init --bare && GIT_DIR="$repo" git symbolic-ref HEAD refs/heads/prod done svn-all-fast-export --identity-map ../authors ../rules "$SVN" @@ -59,7 +60,56 @@ popd pushd packages/python-routefs.git git fetch -t git://github.com/ebroder/python-routefs.git git branch -f upstream 1.0.1 -git branch -f master 1.0.1-1 +git branch -f prod 1.0.1-1 +popd + +pushd packages/python-afs.git +git fetch -t git://github.com/ebroder/pyafs.git +git branch -f upstream 0.1.1 +git branch -f prod 0.1.1-1 +popd + +for r in $(ls packages); do + pushd "packages/$r" + git branch dev prod + popd +done + +mkdir packages.git +pushd packages.git +git init --bare +git symbolic-ref HEAD refs/heads/prod +( + echo 'commit refs/heads/prod' + echo 'mark :1' + echo 'committer Invirt Git Import now' + echo 'data </dev/null + commit="$(git rev-parse refs/heads/prod)" + popd &>/dev/null + + echo "M 160000 $commit ${r%.git}" + done + + echo 'M 100644 inline .gitmodules' + echo 'data <