From: Anders Kaseorg Date: Fri, 5 Feb 2010 05:20:25 +0000 (-0500) Subject: git-migration: Exclude punted packages from the superrepo. X-Git-Url: http://xvm.mit.edu/gitweb/invirt/scripts/git-migration.git/commitdiff_plain/1dfa62c852ed022820b513ef259f2a5061e7d2cd?hp=c24e307014de64ada268d8f179b7c6f7f70996cf;ds=sidebyside git-migration: Exclude punted packages from the superrepo. svn path=/trunk/scripts/git-migration/; revision=2987 --- diff --git a/git-migrate-fast.sh b/git-migrate-fast.sh index 9df05e7..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 @@ -93,21 +103,20 @@ git symbolic-ref HEAD refs/heads/prod 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 <