From 4dc541a1931b3533bd8682e4820a2eaa29db4138 Mon Sep 17 00:00:00 2001
From: Rohit Gupta <rohit.gupta@eurecom.fr>
Date: Fri, 19 Jun 2015 10:03:51 +0000
Subject: [PATCH] git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7598
 818b1a75-f10b-46b9-bf7c-635c3b92a50f

---
 svn2git/README.txt                       | 37 ++++++++++
 svn2git/authors.txt                      | 86 ++++++++++++++++++++++++
 svn2git/authors_original.txt             | 45 +++++++++++++
 svn2git/authors_original_java_output.txt | 86 ++++++++++++++++++++++++
 svn2git/check_diff_author.sh             |  8 +++
 svn2git/git-author-rewrite.sh            | 22 ++++++
 6 files changed, 284 insertions(+)
 create mode 100644 svn2git/README.txt
 create mode 100644 svn2git/authors.txt
 create mode 100644 svn2git/authors_original.txt
 create mode 100644 svn2git/authors_original_java_output.txt
 create mode 100755 svn2git/check_diff_author.sh
 create mode 100644 svn2git/git-author-rewrite.sh

diff --git a/svn2git/README.txt b/svn2git/README.txt
new file mode 100644
index 00000000000..2861e20b5a1
--- /dev/null
+++ b/svn2git/README.txt
@@ -0,0 +1,37 @@
+This file describes briefly the steps that were carried out to migrate from *PUBLIC* OAI SVN repo (http://svn.eurecom.fr/openair4G/trunk) to the gitlab repo (git@gitlab.eurecom.fr:oai/openairinterface5G.git). In order to reduce the size of repository, we have only included SVN commits from r4000 up till now. None of branches/tags are migrated from SVN Repository to Git. 
+
+1. The steps to migrate from SVN to Git were carried out using the instructions/script here, https://www.atlassian.com/git/tutorials/migrating-overview
+
+2. Currently, the repository is public during the "transition period" for everyone to get used to the repository. During the "transition period", we will check in changes only to SVN and synchronize SVN to Git repository once everyday. At the end of "transition period", we will mark SVN repo as read-only and Git repository will be the default working repository. Currently, the "transition period" is set to 1 month until 15 July. However, this date might be changed based on the feedback from the community.There are brief instructions to explain this workflow here, https://www.atlassian.com/git/tutorials/migrating-overview/. 
+
+4. The author list file is located in authors.txt in the main working directory. This file was extracted from SVN logs, but is modified for name and email addresses. 
+
+7. You will need to put your ssh keys in https://gitlab.eurecom.fr/profile/keys to access to the git repo (only important for users who want to commit to the repository)
+
+
+Migration Instructions in Detail:
+Assuming you are in svn2git directory.
+
+wget https://bitbucket.org/atlassian/svn-migration-scripts/downloads/svn-migration-scripts.jar
+java -jar ./svn-migration-scripts.jar verify
+java -jar ./svn-migration-scripts.jar authors http://svn.eurecom.fr/openair4G > authors.txt
+git svn clone -r4000:HEAD --authors-file=./svn2git/authors.txt http://svn.eurecom.fr/openair4G/trunk oaiRepoData1 >& log_svn_clone1.out
+
+(Assuming you have added your ssh keys in https://gitlab.eurecom.fr/profile/keys)
+//One time git configuration of user name/email address
+git config --global user.name "Replace_With_Your_Name"
+git config --global user.email "Replace_With_Your_Email_address"
+
+git remote add origin git@gitlab.eurecom.fr:oai/openairinterface5g.git
+
+git push -u origin --all
+git push --tags
+
+Steps to synchronize (to be carried out periodically)
+git svn fetch --authors-file=./authors.txt
+git svn rebase
+git push -u origin --all
+git push --tags
+
+
+
diff --git a/svn2git/authors.txt b/svn2git/authors.txt
new file mode 100644
index 00000000000..8bf7dbed0e1
--- /dev/null
+++ b/svn2git/authors.txt
@@ -0,0 +1,86 @@
+agostini = agostini <philippe.agostini@thalesgroup.com>
+alexandr = alexandr <alexandr@eurecom.fr>
+ambe = Anne Ambe <anne.ambe@air-lynx.com>
+anouar = Hicham Anouar <hicham.anouar@thalesgroup.com>
+antonb = antonb <antonb@eurecom.fr>
+apostolaras = Apostolos Apostolaras <apaposto@gmail.com>
+arvanita = Arvanita <arvanita@eurecom.fr>
+atsan = Emre Atsan <emre.atsan@epfl.ch>
+auberts = auberts <auberts@eurecom.fr>
+benromdh = benromdh <benromdh@eurecom.fr>
+besnier = Joelle Besnier <joelle.besnier@ifsttar.fr>
+bhamri = Bhamri <bhamri@eurecom.fr>
+bohge = Mathias Bohge <bohge@tkn.tu-berlin.de>
+brizzola = brizzola <brizzola@eurecom.fr>
+byiringi = Byiringi <byiringi@eurecom.fr>
+cerdan = Cerdan <cerdan@eurecom.fr>
+cirkic = Cirkic <cirkic@eurecom.fr>
+demiray = demiray <demiray@eurecom.fr>
+ferreira = Ferreira <ferreira@eurecom.fr>
+fkalten = fkalten <fkalten@eurecom.fr>
+fotimeli = Fotimeli <fotimeli@eurecom.fr>
+foubert = Philippe Foubert <foubert@eurecom.fr>
+gangakhe = Gangakhe <gangakhe@eurecom.fr>
+gangula = gangula <gangula@eurecom.fr>
+garcial = garcial <garcial@eurecom.fr>
+gauthier = Lionel Gauthier <lionel.gauthier@eurecom.fr>
+ghaddab = ghaddab <ghaddab@eurecom.fr>
+ghaffar = ghaffar <ghaffar@eurecom.fr>
+guibene = guibene <guibene@eurecom.fr>
+guptar = Rohit Gupta <rohit.gupta@eurecom.fr>
+haerri = Haerri <haerri@eurecom.fr>
+hafsaoui = Hafsaoui <hafsaoui@eurecom.fr>
+hao = hao <hao@eurecom.fr>
+hashmat = hashmat <hashmat@eurecom.fr>
+hrizi = hrizi <hrizi@eurecom.fr>
+hu = hu <hu@eurecom.fr>
+huang = Huang <huang@eurecom.fr>
+iacobelli = Lorenzo Iacobelli <LORENZO.IACOBELLI@fr.thalesgroup.com>
+ihmig = ihmig <ihmig@eurecom.fr>
+jdagres = jdagres <jdagres@eurecom.fr>
+jiangx = jiangx <jiangx@eurecom.fr>
+kaltenbe = Florian Kaltenberger <florian.kaltenberger@eurecom.fr>
+knopp = Raymond Knopp <raymond.knopp@eurecom.fr>
+kortke = kortke <kortke@eurecom.fr>
+kouassi = kouassi <kouassi@eurecom.fr>
+laklii = laklii <laklii@eurecom.fr>
+latif = latif <latif@eurecom.fr>
+libchaber = libchaber <libchaber@eurecom.fr>
+linhuang = linhuang <linhuang@eurecom.fr>
+lukashov = lukashov <lukashov@eurecom.fr>
+maatalla = maatalla <maatalla@eurecom.fr>
+maurel = maurel <maurel@eurecom.fr>
+mayani = mayani <mayani@eurecom.fr>
+merz = Ruben Merz <ruben.merz@ieee.org>
+mlaner = mlaner <mlaner@eurecom.fr>
+mosli = mosli <mosli@eurecom.fr>
+navid = Navid Nikaein <navid.nikaein@eurecom.fr>
+nguyenhn = nguyenhn <nguyenhn@eurecom.fr>
+nguyennd = nguyennd <nguyennd@eurecom.fr>
+nikaeinn = Navid Nikaein <<navid.nikaein@eurecom.fr>
+oai_user1 = oai_user1 <oai_user1@eurecom.fr>
+ouni = ouni <ouni@eurecom.fr>
+paranche = paranche <paranche@eurecom.fr>
+pburlot = pburlot <pburlot@eurecom.fr>
+qi = qi <qi@eurecom.fr>
+renwanz = renwanz <renwanz@eurecom.fr>
+roux = Cedric Roux <cedric.roux@eurecom.fr>
+sait = sait <sait@eurecom.fr>
+sorby = sorby <sorby@eurecom.fr>
+steinicke = steinicke <steinicke@eurecom.fr>
+thomas = thomas <thomas@eurecom.fr>
+thomasl = thomasl <thomasl@eurecom.fr>
+tonelli = tonelli <tonelli@eurecom.fr>
+unlu = unlu <unlu@eurecom.fr>
+ustun = ustun <ustun@eurecom.fr>
+villa = villa <villa@eurecom.fr>
+wagner = wagner <wagner@eurecom.fr>
+wangl = wangl <wangl@eurecom.fr>
+wetterwa = wetterwa <wetterwa@eurecom.fr>
+wewior = wewior <wewior@eurecom.fr>
+winckel = winckel <winckel@eurecom.fr>
+xuhl = xuhl <xuhl@eurecom.fr>
+yannan = yannan <yannan@eurecom.fr>
+yilmaz = yilmaz <yilmaz@eurecom.fr>
+zayen = zayen <zayen@eurecom.fr>
+zhou = zhou <zhou@eurecom.fr>
diff --git a/svn2git/authors_original.txt b/svn2git/authors_original.txt
new file mode 100644
index 00000000000..7e239ce955f
--- /dev/null
+++ b/svn2git/authors_original.txt
@@ -0,0 +1,45 @@
+agostini = Agostini <philippe.agostini@thalesgroup.com>
+alexandr = Alexandr <alexandr@eurecom.fr>
+ambe = Anne Ambe <anne.ambe@air-lynx.com>
+anouar = Hicham Anouar <hicham.anouar@thalesgroup.com>
+apostolaras = Apostolos Apostolaras <apaposto@gmail.com>
+arvanita = Arvanita <arvanita@eurecom.fr>
+atsan = Emre Atsan <emre.atsan@epfl.ch>
+besnier = Joelle Besnier <joelle.besnier@ifsttar.fr>
+bhamri = Bhamri <bhamri@eurecom.fr>
+bohge = Mathias Bohge <bohge@tkn.tu-berlin.de>
+byiringi = Byiringi <byiringi@eurecom.fr>
+cerdan = Cerdan <cerdan@eurecom.fr>
+cirkic = Cirkic <cirkic@eurecom.fr>
+ferreira = Ferreira <ferreira@eurecom.fr>
+fotimeli = Fotimeli <fotimeli@eurecom.fr>
+foubert = Philippe Foubert <foubert@eurecom.fr>
+gangakhe = Gangakhe <gangakhe@eurecom.fr>
+gangula = gangula <gangula@eurecom.fr>
+gauthier = Lionel Gauthier <lionel.gauthier@eurecom.fr>
+haerri = Haerri <haerri@eurecom.fr>
+hafsaoui = Hafsaoui <hafsaoui@eurecom.fr>
+huang = Huang <huang@eurecom.fr>
+iacobelli = Lorenzo Iacobelli <LORENZO.IACOBELLI@fr.thalesgroup.com>
+ihmig = Ihmig <ihmig@eurecom.fr>
+jiangx = Jiangx <jiangx@eurecom.fr>
+kaltenbe = Florian Kaltenberger <florian.kaltenberger@eurecom.fr>
+knopp = Raymond Knopp <raymond.knopp@eurecom.fr>
+lukashov = Lukashov <lukashov@eurecom.fr>
+navid = Navid Nikaein <navid@eurecom.fr>
+nguyenhn = Nguyenhn <nguyenhn@eurecom.fr>
+nguyennd = Nguyennd <nguyennd@eurecom.fr>
+nikaeinn = nikaeinn <Navid.Nikaein@eurecom.fr>
+oai_user1 = oai_user1 <oai_user1@eurecom.fr>
+ouni = Ouni <ouni@eurecom.fr>
+paranche = paranche <paranche@eurecom.fr>
+qi = qi <qi@eurecom.fr>
+roux = Cedric Roux <roux@eurecom.fr>
+sait = sait <sait@eurecom.fr>
+sorby = sorby <sorby@eurecom.fr>
+thomas = thomas <thomas@eurecom.fr>
+unlu = unlu <unlu@eurecom.fr>
+wagner = wagner <wagner@eurecom.fr>
+yilmaz = yilmaz <yilmaz@eurecom.fr>
+zayen = zayen <zayen@eurecom.fr>
+
diff --git a/svn2git/authors_original_java_output.txt b/svn2git/authors_original_java_output.txt
new file mode 100644
index 00000000000..ca00a069c8a
--- /dev/null
+++ b/svn2git/authors_original_java_output.txt
@@ -0,0 +1,86 @@
+agostini = agostini <agostini@mycompany.com>
+alexandr = alexandr <alexandr@mycompany.com>
+ambe = ambe <ambe@mycompany.com>
+anouar = anouar <anouar@mycompany.com>
+antonb = antonb <antonb@mycompany.com>
+apostolaras = apostolaras <apostolaras@mycompany.com>
+arvanita = arvanita <arvanita@mycompany.com>
+atsan = atsan <atsan@mycompany.com>
+auberts = auberts <auberts@mycompany.com>
+benromdh = benromdh <benromdh@mycompany.com>
+besnier = besnier <besnier@mycompany.com>
+bhamri = bhamri <bhamri@mycompany.com>
+bohge = bohge <bohge@mycompany.com>
+brizzola = brizzola <brizzola@mycompany.com>
+byiringi = byiringi <byiringi@mycompany.com>
+cerdan = cerdan <cerdan@mycompany.com>
+cirkic = cirkic <cirkic@mycompany.com>
+demiray = demiray <demiray@mycompany.com>
+ferreira = ferreira <ferreira@mycompany.com>
+fkalten = fkalten <fkalten@mycompany.com>
+fotimeli = fotimeli <fotimeli@mycompany.com>
+foubert = foubert <foubert@mycompany.com>
+gangakhe = gangakhe <gangakhe@mycompany.com>
+gangula = gangula <gangula@mycompany.com>
+garcial = garcial <garcial@mycompany.com>
+gauthier = gauthier <gauthier@mycompany.com>
+ghaddab = ghaddab <ghaddab@mycompany.com>
+ghaffar = ghaffar <ghaffar@mycompany.com>
+guibene = guibene <guibene@mycompany.com>
+guptar = guptar <guptar@mycompany.com>
+haerri = haerri <haerri@mycompany.com>
+hafsaoui = hafsaoui <hafsaoui@mycompany.com>
+hao = hao <hao@mycompany.com>
+hashmat = hashmat <hashmat@mycompany.com>
+hrizi = hrizi <hrizi@mycompany.com>
+hu = hu <hu@mycompany.com>
+huang = huang <huang@mycompany.com>
+iacobelli = iacobelli <iacobelli@mycompany.com>
+ihmig = ihmig <ihmig@mycompany.com>
+jdagres = jdagres <jdagres@mycompany.com>
+jiangx = jiangx <jiangx@mycompany.com>
+kaltenbe = kaltenbe <kaltenbe@mycompany.com>
+knopp = knopp <knopp@mycompany.com>
+kortke = kortke <kortke@mycompany.com>
+kouassi = kouassi <kouassi@mycompany.com>
+laklii = laklii <laklii@mycompany.com>
+latif = latif <latif@mycompany.com>
+libchaber = libchaber <libchaber@mycompany.com>
+linhuang = linhuang <linhuang@mycompany.com>
+lukashov = lukashov <lukashov@mycompany.com>
+maatalla = maatalla <maatalla@mycompany.com>
+maurel = maurel <maurel@mycompany.com>
+mayani = mayani <mayani@mycompany.com>
+merz = merz <merz@mycompany.com>
+mlaner = mlaner <mlaner@mycompany.com>
+mosli = mosli <mosli@mycompany.com>
+navid = navid <navid@mycompany.com>
+nguyenhn = nguyenhn <nguyenhn@mycompany.com>
+nguyennd = nguyennd <nguyennd@mycompany.com>
+nikaeinn = nikaeinn <nikaeinn@mycompany.com>
+oai_user1 = oai_user1 <oai_user1@mycompany.com>
+ouni = ouni <ouni@mycompany.com>
+paranche = paranche <paranche@mycompany.com>
+pburlot = pburlot <pburlot@mycompany.com>
+qi = qi <qi@mycompany.com>
+renwanz = renwanz <renwanz@mycompany.com>
+roux = roux <roux@mycompany.com>
+sait = sait <sait@mycompany.com>
+sorby = sorby <sorby@mycompany.com>
+steinicke = steinicke <steinicke@mycompany.com>
+thomas = thomas <thomas@mycompany.com>
+thomasl = thomasl <thomasl@mycompany.com>
+tonelli = tonelli <tonelli@mycompany.com>
+unlu = unlu <unlu@mycompany.com>
+ustun = ustun <ustun@mycompany.com>
+villa = villa <villa@mycompany.com>
+wagner = wagner <wagner@mycompany.com>
+wangl = wangl <wangl@mycompany.com>
+wetterwa = wetterwa <wetterwa@mycompany.com>
+wewior = wewior <wewior@mycompany.com>
+winckel = winckel <winckel@mycompany.com>
+xuhl = xuhl <xuhl@mycompany.com>
+yannan = yannan <yannan@mycompany.com>
+yilmaz = yilmaz <yilmaz@mycompany.com>
+zayen = zayen <zayen@mycompany.com>
+zhou = zhou <zhou@mycompany.com>
diff --git a/svn2git/check_diff_author.sh b/svn2git/check_diff_author.sh
new file mode 100755
index 00000000000..7d55cfe9a55
--- /dev/null
+++ b/svn2git/check_diff_author.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+#The following script checks if the author list changed since the last commits in svn. If it finds difference in author names, then we need to add the author names manually in authors.txt
+
+wget https://bitbucket.org/atlassian/svn-migration-scripts/downloads/svn-migration-scripts.jar
+java -jar ./svn-migration-scripts.jar verify
+java -jar ./svn-migration-scripts.jar authors http://svn.eurecom.fr/openair4G > /tmp/authors.txt
+diff /tmp/authors.txt ./authors_original_java_output.txt
diff --git a/svn2git/git-author-rewrite.sh b/svn2git/git-author-rewrite.sh
new file mode 100644
index 00000000000..b959db6b2eb
--- /dev/null
+++ b/svn2git/git-author-rewrite.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+#Script to change author name/email address in git. It throws errors/warnings during the migration
+#Copied from,  https://help.github.com/articles/changing-author-info/
+
+git filter-branch --env-filter '
+
+OLD_EMAIL="your-old-email@example.com"
+CORRECT_NAME="Your Correct Name"
+CORRECT_EMAIL="your-correct-email@example.com"
+
+if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
+then
+    export GIT_COMMITTER_NAME="$CORRECT_NAME"
+    export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
+fi
+if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ]
+then
+    export GIT_AUTHOR_NAME="$CORRECT_NAME"
+    export GIT_AUTHOR_EMAIL="$CORRECT_EMAIL"
+fi
+' --tag-name-filter cat -- --branches --tags
+
-- 
GitLab