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

Last change on this file since 1927 was 1922, checked in by andersk, 16 years ago

Use the upstream Git repo for python-routefs.

  • Property svn:executable set to *
File size: 1.9 KB
Line 
1#!/bin/bash
2set -e
3
4SVN=${1:-/mit/xvm/svn}
5
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
16svn-all-fast-export --identity-map <(sed 's/= //' ../authors) ../rules "$SVN"
17
18sed -n 's/^create repository // p' ../rules | while read repo; do
19    ! [ -e "$repo/refs/heads/tags" ] || \
20        cp -a "$repo/refs/heads/tags/." "$repo/refs/tags" && \
21        rm -rf "$repo/refs/heads/tags"
22done
23
24pushd packages/invirt-remote.git
25echo $(git rev-parse 0.2.0 invirt-remote-server invirt-remote-host) >> info/grafts
26git filter-branch --tag-name-filter cat -- ^invirt-remote-server ^invirt-remote-host --all
27rm -rf info/grafts refs/original refs/heads/invirt-remote-server refs/heads/invirt-remote-host
28popd
29
30pushd packages/invirt-console.git
31echo $(git rev-parse 0.2.0 0.2.0^ invirt-console-host) >> info/grafts
32git filter-branch --tag-name-filter cat -- ^0.2.0^ ^invirt-console-host --all
33rm -rf info/grafts refs/original refs/heads/invirt-console-host
34popd
35
36pushd packages/invirt-dns.git
37echo $(git rev-parse sipb-xen-dns/1~10 sipb-xen-dns/1~11 dns) >> info/grafts
38git filter-branch --tag-name-filter cat -- ^sipb-xen-dns/1~11 ^dns --all
39rm -rf info/grafts refs/original refs/heads/dns
40popd
41
42pushd packages/libyaml.git
43git 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
44git branch upstream upstream/0.1.1
45echo $(git rev-parse 0.1.1-1_andersk1 debian/0.1.1-1^0) >> info/grafts
46git filter-branch --tag-name-filter cat -- ^debian/0.1.1-1 --all
47rm -rf info/grafts refs/original
48popd
49
50pushd packages/python-routefs.git
51git fetch git://github.com/ebroder/python-routefs.git debian:refs/heads/debian
52git tag -f 1.0.1-1 2fc1d90
53git branch -f master 1.0.1-1
54git branch -d debian
55popd
56
57echo
58echo 'The Git migration was successful.'
Note: See TracBrowser for help on using the repository browser.