X-Git-Url: http://xvm.mit.edu/gitweb/invirt/scripts/git-migration.git/blobdiff_plain/6cd8f7d2c08eb975fe11c92c9534ccd18714634d..HEAD:/git-migrate-fast.sh diff --git a/git-migrate-fast.sh b/git-migrate-fast.sh index 1cde7d5..6ae4f30 100755 --- a/git-migrate-fast.sh +++ b/git-migrate-fast.sh @@ -13,6 +13,16 @@ SVN=${1:-/mit/xvm/svn} mako-render rules.mako > rules +packages=($(python -c ' +import yaml +svn = yaml.load(file("svn.yml")) +packages = svn["packages"] +current_packages = sorted(package for package in packages + if "punt" not in packages[package] and + "merge" not in packages[package]) +print "\n".join(current_packages) +')) + rm git -rf mkdir git cd git @@ -76,8 +86,8 @@ 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" +for package in "${packages[@]}"; do + pushd "packages/$package.git" git branch dev prod popd done @@ -91,23 +101,22 @@ git symbolic-ref HEAD refs/heads/prod echo 'mark :1' echo 'committer Invirt Git Import now' echo 'data </dev/null + for package in "${packages[@]}"; do + pushd "../packages/$package.git" &>/dev/null commit="$(git rev-parse refs/heads/prod)" popd &>/dev/null - echo "M 160000 $commit ${r%.git}" + echo "M 160000 $commit $package" done echo 'M 100644 inline .gitmodules' echo 'data <