Changeset 2987


Ignore:
Timestamp:
Feb 5, 2010, 12:20:25 AM (15 years ago)
Author:
andersk
Message:

git-migration: Exclude punted packages from the superrepo.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/scripts/git-migration/git-migrate-fast.sh

    r2867 r2987  
    1313
    1414mako-render rules.mako > rules
     15
     16packages=($(python -c '
     17import yaml
     18svn = yaml.load(file("svn.yml"))
     19packages = svn["packages"]
     20current_packages = sorted(package for package in packages
     21                          if "punt" not in packages[package] and
     22                             "merge" not in packages[package])
     23print "\n".join(current_packages)
     24'))
    1525
    1626rm git -rf
     
    7787popd
    7888
    79 for r in $(ls packages); do
    80     pushd "packages/$r"
     89for package in "${packages[@]}"; do
     90    pushd "packages/$package.git"
    8191    git branch dev prod
    8292    popd
     
    94104    echo 'Initial superproject creation.'
    95105    echo 'EOF'
    96     for r in $(ls ../packages); do
    97         pushd "../packages/$r" &>/dev/null
     106    for package in "${packages[@]}"; do
     107        pushd "../packages/$package.git" &>/dev/null
    98108        commit="$(git rev-parse refs/heads/prod)"
    99109        popd &>/dev/null
    100110
    101         echo "M 160000 $commit ${r%.git}"
     111        echo "M 160000 $commit $package"
    102112    done
    103113
    104114    echo 'M 100644 inline .gitmodules'
    105115    echo 'data <<EOF'
    106     for r in $(ls ../packages); do
    107         r="${r%.git}"
    108         printf '[submodule "%s"]\n' "$r"
    109         printf '\tpath = %s\n' "$r"
    110         printf '\turl = ../packages/%s.git\n' "$r"
     116    for package in "${packages[@]}"; do
     117        printf '[submodule "%s"]\n' "$package"
     118        printf '\tpath = %s\n' "$package"
     119        printf '\turl = ../packages/%s.git\n' "$package"
    111120    done
    112121    echo 'EOF'
Note: See TracChangeset for help on using the changeset viewer.