projects
/
invirt/scripts/git-migration.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
As a package maintained upstream in git, use the same logic in the git
[invirt/scripts/git-migration.git]
/
git-migrate-fast.sh
diff --git
a/git-migrate-fast.sh
b/git-migrate-fast.sh
index
56c2927
..
f3bfd54
100755
(executable)
--- a/
git-migrate-fast.sh
+++ b/
git-migrate-fast.sh
@@
-18,7
+18,7
@@
mkdir git
cd git
sed -n 's/^create repository // p' ../rules | while read repo; do
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"
done
svn-all-fast-export --identity-map ../authors ../rules "$SVN"
@@
-60,12
+60,25
@@
popd
pushd packages/python-routefs.git
git fetch -t git://github.com/ebroder/python-routefs.git
git branch -f upstream 1.0.1
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
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
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 'commit refs/heads/prod'
echo 'mark :1'
@@
-75,7
+88,7
@@
git init --bare
echo 'EOF'
for r in $(ls ../packages); do
pushd "../packages/$r" &>/dev/null
echo 'EOF'
for r in $(ls ../packages); do
pushd "../packages/$r" &>/dev/null
- commit="$(git rev-parse refs/heads/master)"
+ commit="$(git rev-parse refs/heads/prod)"
popd &>/dev/null
echo "M 160000 $commit ${r%.git}"
popd &>/dev/null
echo "M 160000 $commit ${r%.git}"
@@
-87,7
+100,7
@@
git init --bare
r="${r%.git}"
printf '[submodule "%s"]\n' "$r"
printf '\tpath = %s\n' "$r"
r="${r%.git}"
printf '[submodule "%s"]\n' "$r"
printf '\tpath = %s\n' "$r"
- printf '\turl = git://invirt.mit.edu/packages/%s.git\n' "$r"
+ printf '\turl = git://invirt.mit.edu/invirt/packages/%s.git\n' "$r"
done
echo 'EOF'
done
echo 'EOF'