Changeset 2987 for trunk/scripts
- Timestamp:
- Feb 5, 2010, 12:20:25 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/scripts/git-migration/git-migrate-fast.sh
r2867 r2987 13 13 14 14 mako-render rules.mako > rules 15 16 packages=($(python -c ' 17 import yaml 18 svn = yaml.load(file("svn.yml")) 19 packages = svn["packages"] 20 current_packages = sorted(package for package in packages 21 if "punt" not in packages[package] and 22 "merge" not in packages[package]) 23 print "\n".join(current_packages) 24 ')) 15 25 16 26 rm git -rf … … 77 87 popd 78 88 79 for r in $(ls packages); do80 pushd "packages/$ r"89 for package in "${packages[@]}"; do 90 pushd "packages/$package.git" 81 91 git branch dev prod 82 92 popd … … 94 104 echo 'Initial superproject creation.' 95 105 echo 'EOF' 96 for r in $(ls ../packages); do97 pushd "../packages/$ r" &>/dev/null106 for package in "${packages[@]}"; do 107 pushd "../packages/$package.git" &>/dev/null 98 108 commit="$(git rev-parse refs/heads/prod)" 99 109 popd &>/dev/null 100 110 101 echo "M 160000 $commit $ {r%.git}"111 echo "M 160000 $commit $package" 102 112 done 103 113 104 114 echo 'M 100644 inline .gitmodules' 105 115 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" 111 120 done 112 121 echo 'EOF'
Note: See TracChangeset
for help on using the changeset viewer.