Skip to content

Instantly share code, notes, and snippets.

@timdream
Created April 25, 2012 03:01
Show Gist options
  • Save timdream/2485851 to your computer and use it in GitHub Desktop.
Save timdream/2485851 to your computer and use it in GitHub Desktop.
git-svn conversion for moztw-web
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[svn-remote "svn"]
url = http://svn.openfoundry.org/moztw
fetch = :refs/remotes/git-svn
[svn]
authorsfile = /home/timdream/repo/moztw/authors.txt
[remote "origin"]
url = git@github.com:moztw/svn.git
fetch = +refs/heads/*:refs/remotes/origin/*
ants = ants <antblog701@gmail.com>
bobchao = bobchao <bobchao@mail.moztw.org>
BobChao = bobchao <bobchao@mail.moztw.org>
bootleq = bootleq <bootleq@gmail.com>
CQD = CQD <cqd@hiigara.net>
dwchiang = dwchiang <dwchiang@gmail.com>
irvin = Irvin <irvin@mail.moztw.org>
irvinfly = Irvin <irvin@mail.moztw.org>
j100002ben = Benjamin Peng <j100002ben@gmail.com>
josesun = josesun <josesun@mail.moztw.org>
kourge = Wilson Lee <kourge@gmail.com>
littlebtc = Hsiao-Ting Yu <sst.dreams@gmail.com>
orinx = orinx <orinx@orinx.com>
othree = othree <othree@gmail.com>
petercpg = petercpg <petercpg@mail.moztw.org>
piaip = piaip <piaip@csie.ntu.edu.tw>
timdream = Timothy Guan-tin Chien <timdream@gmail.com>
wandererm = kidwm <wandererm@gmail.com>
KevinWY = Kevin Chiou <aa48965@gmail.com>
poying = Poying <poying.me@gmail.com>
tobbymailbox = TobyOoO <tobbymailbox@gmail.com>
thomasy = thomasysliu <thomasysliu@gmail.com>
#!/bin/bash
# clone without normailze the author info
git svn clone http://svn.openfoundry.org/moztw svn
# get all authors from a cloned git-svn repo
git log --pretty=format:%an | sort | uniq > ../authors.txt
# clone
git svn -A authors.txt clone http://svn.openfoundry.org/moztw svn2
# follow up svn changes
git svn -A ../authors.txt rebase
# do a svn commit (git log must be linear on master, do not do no-ff merge)
git commit; git svn -A ../authors.txt dcommit
git svn -A ../authors.txt rebase && git push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment