source: trunk/scripts/git-migration/git-migrate-fast.sh @ 2006

Last change on this file since 2006 was 1957, checked in by price, 16 years ago

fix a shell conditional

  • Property svn:executable set to *
File size: 2.1 KB
RevLine 
[1901]1#!/bin/bash
2set -e
3
[1902]4SVN=${1:-/mit/xvm/svn}
5
[1901]6mako-render rules.mako > rules
7
8rm git -rf
9mkdir git
10cd git
11
12sed -n 's/^create repository // p' ../rules | while read repo; do
13    mkdir -p "$repo" && GIT_DIR="$repo" git init --bare
14done
15
[1941]16svn-all-fast-export --identity-map ../authors ../rules "$SVN"
[1901]17
18sed -n 's/^create repository // p' ../rules | while read repo; do
[1957]19    if [ -e "$repo/refs/heads/tags" ]; then
20        cp -a "$repo/refs/heads/tags/." "$repo/refs/tags"
21        rm -rf "$repo/refs/heads/tags"
22    fi
[1901]23done
[1920]24
25pushd packages/invirt-remote.git
26echo $(git rev-parse 0.2.0 invirt-remote-server invirt-remote-host) >> info/grafts
27git filter-branch --tag-name-filter cat -- ^invirt-remote-server ^invirt-remote-host --all
28rm -rf info/grafts refs/original refs/heads/invirt-remote-server refs/heads/invirt-remote-host
29popd
30
31pushd packages/invirt-console.git
32echo $(git rev-parse 0.2.0 0.2.0^ invirt-console-host) >> info/grafts
33git filter-branch --tag-name-filter cat -- ^0.2.0^ ^invirt-console-host --all
34rm -rf info/grafts refs/original refs/heads/invirt-console-host
35popd
36
37pushd packages/invirt-dns.git
38echo $(git rev-parse sipb-xen-dns/1~10 sipb-xen-dns/1~11 dns) >> info/grafts
39git filter-branch --tag-name-filter cat -- ^sipb-xen-dns/1~11 ^dns --all
40rm -rf info/grafts refs/original refs/heads/dns
41popd
42
[1956]43pushd packages/invirt-database-server.git
44git fetch ../invirt-database.git refs/tags/0.0.1:refs/heads/tmp
45echo $(git rev-parse 0.0.1 refs/heads/tmp^) >> info/grafts
46git filter-branch --tag-name-filter cat -- ^refs/heads/tmp --all
47rm -rf info/grafts refs/original refs/heads/tmp
48popd
49
[1920]50pushd packages/libyaml.git
51git fetch git://andersk.mit.edu/libyaml.git refs/tags/upstream/0.1.1:refs/tags/upstream/0.1.1 refs/tags/debian/0.1.1-1:refs/tags/debian/0.1.1-1
52git branch upstream upstream/0.1.1
53echo $(git rev-parse 0.1.1-1_andersk1 debian/0.1.1-1^0) >> info/grafts
54git filter-branch --tag-name-filter cat -- ^debian/0.1.1-1 --all
55rm -rf info/grafts refs/original
56popd
57
[1922]58pushd packages/python-routefs.git
[1939]59git fetch -t git://github.com/ebroder/python-routefs.git
60git branch -f upstream 1.0.1
[1922]61git branch -f master 1.0.1-1
62popd
63
[1920]64echo
65echo 'The Git migration was successful.'
Note: See TracBrowser for help on using the repository browser.