[svn-to-git] 01/01: Add initial files

Markus Koschany apo at moszumanska.debian.org
Tue May 10 20:31:29 UTC 2016


This is an automated email from the git hooks/post-receive script.

apo pushed a commit to branch master
in repository svn-to-git.

commit dda94953b7c059c3457cb880a5de48026db27c20
Author: Markus Koschany <apo at debian.org>
Date:   Tue May 10 22:30:01 2016 +0200

    Add initial files
---
 migrate-svn-repo-to-git | 104 ++++++++++++++++++++++++
 mkGitSvnAliasFile.pl    |  39 +++++++++
 pkg-games-authors.txt   | 205 ++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 348 insertions(+)

diff --git a/migrate-svn-repo-to-git b/migrate-svn-repo-to-git
new file mode 100755
index 0000000..d94476c
--- /dev/null
+++ b/migrate-svn-repo-to-git
@@ -0,0 +1,104 @@
+#!/bin/bash
+#
+# Script to migrate a package from SVN to Git on Alioth.
+# This script is tailored for the packages maintained by the Games team.
+#
+
+if [ -z "$1" ]; then
+    echo "Usage: ./migrate-svn-repo-to-git <packagename>"
+    exit 1;
+fi
+
+PACKAGE=$1
+TEAM=pkg-games
+
+# Create an empty Git repository with an upstream branch
+echo "Initializing the Git repository..."
+git init $PACKAGE
+pushd $PACKAGE
+git checkout --orphan upstream
+git commit --allow-empty -m 'Initial upstream branch.'
+git checkout --orphan master
+
+git remote add origin git+ssh://git.debian.org/git/$TEAM/$PACKAGE
+
+# Clone the SVN repository
+echo "Cloning the SVN repository.."
+git svn clone --authors-file=../$TEAM-authors.txt \
+              --no-metadata \
+              --trunk=trunk/$PACKAGE \
+              --tags=tags/$PACKAGE \
+              svn+ssh://svn.debian.org/svn/$TEAM/packages/ \
+              .
+git reset --hard
+
+# Turn the branches into tags
+echo "Converting branches to tags..."
+for branch in `git branch -r`; do
+    if [ `echo $branch | egrep "tags/.+$"` ]; then
+        version=`basename $branch`
+        subject=`git log -1 --pretty=format:"%s" $branch`
+        GIT_COMMITTER_DATE=`git log -1 --pretty=format:"%ci" $branch` \
+            git tag -f -m "$subject" "debian/$version" "$branch^"
+
+        git branch -d -r $branch
+    fi
+done
+
+# Remove the remotes/origin/trunk reference
+git branch -rd origin/trunk
+
+# Update the Vcs-* fields
+echo "Updating debian/control..."
+sed -i
+"s#https://anonscm.debian.org/viewvc/$TEAM/packages/trunk/\([^/]*\)/\?#https://anonscm.debian.org/cgit/$TEAM/\1.git#g" debian/control
+sed -i "s#http://svn.debian.org/wsvn/$TEAM/packages/trunk/\([^/]*\)/\?#http://anonscm.debian.org/cgit/$TEAM/\1.git#g" debian/control
+
+sed -i "s#Vcs-Svn: svn://anonscm.debian.org/$TEAM/packages/trunk/\([^/]*\)/\?#Vcs-Git: git://anonscm.debian.org/$TEAM/\1.git#g" debian/control
+sed -i "s#Vcs-Svn: svn://svn.debian.org/svn/$TEAM/packages/trunk/\([^/]*\)/\?#Vcs-Git: git://anonscm.debian.org/$TEAM/\1.git#g" debian/control
+
+echo "Updated Vcs-* fields:"
+grep Vcs- debian/control
+
+# Document the migration in debian/changelog
+dch 'Moved the package to Git'
+
+# Commit the changes
+git commit debian/control debian/changelog -m 'Moved the package to Git'
+
+echo ""
+while true; do
+    read -p "Do you want to push the migrated repository now? [yN] " choice
+    case $choice in
+        [Yy]* ) break;;
+        * ) exit;;
+    esac
+done
+
+# Create the Git repository on alioth
+echo "Creating the Git repository on alioth..."
+ssh alioth.debian.org "cd /srv/git.debian.org/git/$TEAM && ./setup-repository $PACKAGE && mv $PACKAGE.git/hooks/post-receive $PACKAGE.git/hooks/post-receive.disabled"
+
+# Push the new repository
+echo "Pushing the new repository..."
+git push --all
+git push --tags
+
+# Re-enable the post receive hook
+ssh alioth.debian.org "cd /srv/git.debian.org/git/$TEAM && mv $PACKAGE.git/hooks/post-receive.disabled $PACKAGE.git/hooks/post-receive"
+
+# Add a file in the SVN repository documenting the migration
+echo "Marking the SVN repository as obsolete..."
+svn checkout svn+ssh://svn.debian.org/svn/$TEAM/packages/trunk/$PACKAGE . --depth empty
+echo "The $PACKAGE package is now maintained in a Git repository.
+Please clone git+ssh://anonscm.debian.org/git/$TEAM/$PACKAGE to work on this package.
+" > MOVED_TO_GIT.txt
+
+svn add MOVED_TO_GIT.txt
+svn commit MOVED_TO_GIT.txt -m "Moved $PACKAGE to Git"
+rm -Rf MOVED_TO_GIT.txt .svn
+
+echo ""
+echo "Migration completed"
+echo "New repository located at git+ssh://git.debian.org/git/$TEAM/$PACKAGE"
+echo ""
diff --git a/mkGitSvnAliasFile.pl b/mkGitSvnAliasFile.pl
new file mode 100755
index 0000000..9e6dbaf
--- /dev/null
+++ b/mkGitSvnAliasFile.pl
@@ -0,0 +1,39 @@
+#!/usr/bin/perl
+# Copyright 2008 Gonéri Le Bouder <goneri at rulezlan.org>
+# MIT licence.
+#
+# Usage:
+# cd /somewhere/pkg-games/packages/trunk
+# ./mkGitSvnAliasFile.pl > alias
+
+use strict;
+use warnings;
+
+use File::Find;
+
+my %hash = (
+  'baby-guest' => 'Miriam Ruiz <little_miry at yahoo.es>',
+  'eddyp-guest' => 'Eddy Petrișor <eddy.petrisor at gmail.com>',
+  'tolimar' => 'Alexander Reichle-Schmehl <tolimar at debian.org>'
+);
+
+sub wanted () {
+    return unless -f $File::Find::name;
+    return unless $File::Find::name =~ /\/debian\/changelog/;
+
+    open CHANGELOG, "<$File::Find::name" or die "$!";
+    foreach (<CHANGELOG>) {
+        next unless /^ -- (\w.+<(\S+)@[\S]+>)  /;
+        my $login = $2;
+        my $who = $1;
+        next if exists($hash{$login}) && $hash{$login} =~ /debian\.org/;
+        $hash{$login} = $who;
+    }
+    close CHANGELOG;
+}
+
+finddepth({ wanted => \&wanted, follow => 1, no_chdir => 1 }, '.');
+foreach (keys %hash) {
+  print $_." = ".$hash{$_}."\n";
+  print $_."-guest = ".$hash{$_}."\n";
+}
diff --git a/pkg-games-authors.txt b/pkg-games-authors.txt
new file mode 100644
index 0000000..7881b42
--- /dev/null
+++ b/pkg-games-authors.txt
@@ -0,0 +1,205 @@
+kibi = Cyril Brulebois <kibi at debian.org>
+kibi-guest = Cyril Brulebois <kibi at debian.org>
+tolimar = Alexander Reichle-Schmehl <tolimar at debian.org>
+tolimar-guest = Alexander Reichle-Schmehl <tolimar at debian.org>
+sesse = Steinar H. Gunderson <sesse at debian.org>
+sesse-guest = Steinar H. Gunderson <sesse at debian.org>
+goneri = Gonéri Le Bouder <goneri at rulezlan.org>
+goneri-guest = Gonéri Le Bouder <goneri at rulezlan.org>
+baby-guest = Miriam Ruiz <little_miry at yahoo.es>
+baby-guest-guest = Miriam Ruiz <little_miry at yahoo.es>
+cyril.brulebois = Cyril Brulebois <cyril.brulebois at enst-bretagne.fr>
+cyril.brulebois-guest = Cyril Brulebois <cyril.brulebois at enst-bretagne.fr>
+tbm = Martin Michlmayr <tbm at cyrius.com>
+tbm-guest = Martin Michlmayr <tbm at cyrius.com>
+jmm = Moritz Muehlenhoff <jmm at debian.org>
+jmm-guest = Moritz Muehlenhoff <jmm at debian.org>
+eddyp-guest = Eddy Petrișor <eddy.petrisor at gmail.com>
+eddyp-guest-guest = Eddy Petrișor <eddy.petrisor at gmail.com>
+apo = Markus Koschany <apo at gambaru.de>
+apo-guest = Markus Koschany <apo at gambaru.de>
+(no author) = (no author) <nobody at debian.org>
+adrianperez-guest = Adrian Perez <adrianperez.deb at gmail.com>
+aelmahmoudy-guest = Ahmed El-Mahmoudy <aelmahmoudy at sabily.org>
+akumar = Kumar Appaiah <akumar at debian.org>
+apeeters-guest = Adriaan Peeters <apeeters at lashout.net>
+arnaud-guest = Arnaud Vandyck <avdyk at debian.org>
+avdyk = Arnaud Vandyck <avdyk at debian.org>
+barryh-guest = Barry Hawkins <barry.hawkins at gmail.com>
+bayle = Christian Bayle <bayle at debian.org>
+bdrung = Benjamin Drung <bdrung at debian.org>
+bortz = Stephane Bortzmeyer <bortz at debian.org>
+cedricpineau-guest = Cédric Pineau <cedric.pineau at gmail.com>
+cfry = Charles Fry <cfry at debian.org>
+cfry-guest = Charles Fry <cfry at debian.org>
+claviola = Carlos Laviola <claviola at debian.org>
+dirson = Yann Dirson <dirson at debian.org>
+dleidert-guest = Daniel Leidert <daniel.leidert.spam at gmx.net>
+doko = Matthias Klose <doko at debian.org>
+dominik-guest = Dominik Smatana <dominik at fsf.sk>
+drazzib = Damien Raude-Morvan <drazzib at debian.org>
+drazzib-guest = Damien Raude-Morvan <drazzib at debian.org>
+ebourg-guest = Emmanuel Bourg <ebourg at apache.org>
+egonw-guest = Egon Willighagen <egonw at users.sf.net>
+erich = Erich Schubert <erich at debian.org>
+eugene-guest = Eugene Zhukov <jevgeni.zh at gmail.com>
+ewl-guest = Eric Lavarde <deb at zorglub.s.bawue.de>
+fnatter-guest = Felix Natter <fnatter at gmx.net>
+fourmond = Vincent Fourmond <fourmond at debian.org>
+gerardo-guest = Gerardo Curiel <gcuriel at debian.org.ve>
+gg0-guest = Gabriele Giacone <1o5g4r8o at gmail.com>
+gilbert-guest = Michael Gilbert <michael.s.gilbert at gmail.com>
+gio = Giovanni Mascellani <gio at debian.org>
+gmascellani-guest = Giovanni Mascellani <gio at debian.org>
+gmazoyer-guest = Guillaume Mazoyer <respawneral at gmail.com>
+goonie-guest = Andreas Schildbach <andreas at schildbach.de>
+gregoa = Gregor Herrmann <gregoa at debian.org>
+hauro-guest = Manuel Prinz <debian at pinguinkiste.de>
+ieugen-guest = Stan Ioan-Eugen <stan.ieugen at gmail.com>
+jab = Jeff Breidenbach <jab at debian.org>
+jamespage-guest = James Page <james.page at canonical.com>
+jandd-guest = Jan Dittberner <jandd at debian.org>
+janpascal-guest = Jan-Pascal van Best <janpascal at vanbest.org>
+jasonb-guest = Jason Brittain <jason.brittain at mulesoft.com>
+jerico-guest = Florian Grandel <jerico.dev at gmail.com>
+jeroen = Jeroen van Wolffelaar <jeroen at debian.org>
+jonny = Jonny Lamb <jonny at debian.org>
+killer = Kalle Kivimaa <killer at debian.org>
+kumanna-guest = Kumar Appaiah <akumar at ee.iitm.ac.in>
+lcycon-guest = Luke Cycon <lcycon at gmail.com>
+llucifer-guest = Philipp Meier <meier at fnogol.de>
+ludovicc-guest = Ludovic Claude <ludovic.claude at laposte.net>
+maestro_alubia-guest = Fabian Köster <koesterreich at gmx.net>
+malat = Mathieu Malaterre <malat at debian.org>
+malat-guest = Mathieu Malaterre <malat at debian.org>
+manuel = Mathieu Malaterre <malat at debian.org>
+marcusb-guest = Marcus Better <marcus at better.se>
+matthias-guest = Matthias Schmitz <matthias at sigxcpu.org>
+mbanck = Michael Banck <mbanck at debian.org>
+mehdi = Mehdi Dogguy <mehdi at debian.org>
+mh = Mark Howard <mh at debian.org>
+mjj29 = Matthew Johnson <mjj29 at debian.org>
+mkoch = Michael Koch <konqueror at gmx.de>
+mkoch-guest = Michael Koch <konqueror at gmx.de>
+moeller = Steffen Möller <moeller at debian.org>
+mslama-guest = Marek Slama <marek.slama at sun.com>
+nd-guest = Andreas Putzo <andreas at putzo.net>
+nomadium-guest = Miguel Landaeta <miguel at miguel.cc>
+nthykier = Niels Thykier <nthykier at debian.org>
+nthykier-guest = Niels Thykier <nthykier at debian.org>
+ola = Ola Nordmann <olapc at yahoo.no>
+onkarshinde-guest = Onkar Shinde <onkarshinde at ubuntu.com>
+osallou = Olivier Sallou <osallou at debian.org>
+pabloduboue-guest = Pablo Duboue <pablo.duboue at gmail.com>
+paulcager-guest = Paul Cager <paul-debian at home.paulcager.org>
+pcc-guest = Peter Collingbourne <peter at pcc.me.uk>
+pere = Petter Reinholdtsen <pere at debian.org>
+periapt-guest = Nicholas Bamber <nicholas at periapt.co.uk>
+petere = Peter Eisentraut <petere at debian.org>
+rene = Rene Engelhard <rene at debian.org>
+rk13-guest = Vladimir Kotov <vladimir at kotov.lv>
+rockclimb-guest = Andrew Ross <ubuntu at rossfamily.co.uk>
+rzr-guest = Philippe Coval <rzr at gna.org>
+sgybas = Stefan Gybas <sgybas at debian.org>
+smoe-guest = Steffen Möller <moeller at debian.org>
+sonne = Soeren Sonnenburg <sonne at debian.org>
+starswifter-guest = Morten Sørensen <starswifter at gmail.com>
+sylvestre = Sylvestre Ledru <sylvestre at debian.org>
+sylvestre-guest = Sylvestre Ledru <sylvestre at debian.org>
+tashiro-guest = Stephan Michels <stephan.michels at gmail.com>
+tedp-guest = Ted Percival <ted at midg3t.net>
+tgg = Thomas Girard <tgg at debian.org>
+thkoch-guest = Thomas Koch <thomas at koch.ro>
+tiagosab-guest = Tiago Saboga <tiagosaboga at gmail.com>
+tille = Andreas Tille <tille at debian.org>
+tincho-guest = Martín Ferrari <tincho at debian.org>
+tmancill = Tony Mancill <tmancill at debian.org>
+tora = Takashi Okamoto <tora at debian.org>
+trygvis-guest = Trygve Laugstøl <trygvis at inamo.no>
+ttx-guest = Thierry Carrez <thierry.carrez at ubuntu.com>
+twerner = Torsten Werner <twerner at debian.org>
+varun = Varun Hiremath <varun at debian.org>
+varun-guest = Varun Hiremath <varun at debian.org>
+vincentc-guest = Vincent Cheng <Vincentc1208 at gmail.com>
+vladimir-guest = Vladimír Lapáček <vladimir.lapacek at gmail.com>
+wasabi-guest = Jerry Haltom <wasabi at larvalstage.net>
+wbaer-guest = Wolfgang Bär <wbaer at gmx.de>
+werner = Morten Werner Olsen <werner at debian.org>
+werner-guest = Morten Werner Olsen <werner at debian.org>
+xhaakon-guest = Jakub Adam <jakub.adam at ktknet.cz>
+yesx-guest = Shuxiong Ye <yeshuxiong at gmail.com>
+zuch-guest = Manu Mahajan <manu at codepencil.com>
+jmm = Moritz Muehlenhoff <jmm at debian.org>
+jmm-guest = Moritz Muehlenhoff <jmm at debian.org>
+bddebian = Barry deFreese <bddebian at comcast.net>
+bddebian-guest = Barry deFreese <bddebian at comcast.net>
+fenio = Bartosz Fenski <fenio at debian.org>
+fenio-guest = Bartosz Fenski <fenio at debian.org>
+baby-guest = Miriam Ruiz <little_miry at yahoo.es>
+baby-guest-guest = Miriam Ruiz <little_miry at yahoo.es>
+bdefreese = Barry deFreese <bdefreese at debian.org>
+bdefreese-guest = Barry deFreese <bdefreese at debian.org>
+sam+deb = Sam Hocevar (Debian packages) <sam+deb at zoy.org>
+sam+deb-guest = Sam Hocevar (Debian packages) <sam+deb at zoy.org>
+xnox = Dmitrijs Ledkovs <xnox at debian.org>
+xnox-guest = Dmitrijs Ledkovs <xnox at debian.org>
+debfx-pkg = Felix Geyer <debfx-pkg at fobos.de>
+debfx-pkg-guest = Felix Geyer <debfx-pkg at fobos.de>
+ana = Ana Beatriz Guerrero López <ana at debian.org>
+ana-guest = Ana Beatriz Guerrero López <ana at debian.org>
+pabs = Paul Wise <pabs at debian.org>
+pabs-guest = Paul Wise <pabs at debian.org>
+fuddl-guest = Bruno Fuddl Kleinert <fuddl at debian.org>
+fuddl = Bruno Fuddl Kleinert <fuddl at debian.org>
+evgeni = Evgeni Golov <evgeni at debian.org>
+evgeni-guest = Evgeni Golov <evgeni at debian.org>
+linas-guest = Linas Žvirblis <0x0007 at gmail.com>
+linas = Linas Žvirblis <0x0007 at gmail.com>
+jmtd-guest = Jon Dowland <jmtd at debian.org>
+jmtd = Jon Dowland <jmtd at debian.org>
+ansgar-guest = Ansgar Burchardt <ansgar at debian.org>
+ansgar = Ansgar Burchardt <ansgar at debian.org>
+miriam =  Miriam Ruiz <miriam at debian.org>
+debfx-guest = Felix Geyer <fgeyer at debian.org>
+debfx = Felix Geyer <fgeyer at debian.org>
+noskcaj-guest = Jackson Doak <noskcaj at ubuntu.com>
+noskcaj = Jackson Doak <noskcaj at ubuntu.com>
+vcheng = Vincent Cheng <vcheng at debian.org>
+vcheng-guest = Vincent Cheng <Vincentc1208 at gmail.com>
+sukria = Alexis Sukrieh <sukria at debian.org>
+sukria-guest = Alexis Sukrieh <sukria at debian.org>
+roam-guest = Peter Pentchev <roam at ringlet.net>
+softcoder-guest = Mark Vejvoda <mark_vejvoda at hotmail.com>
+pdewacht-guest = Peter de Wachter <pdewacht at gmail.com>
+laney-guest = Iain Lane <laney at debian.org>
+alfie = Gerfried Fuchs <alfie at debian.org>
+christoph = Christoph Egger <christoph at debian.org>
+vela = Matej Vela <vela at debian.org>
+vela-guest = Matej Vela <vela at debian.org>
+sho = Sam Hocevar <sho at debian.org>
+gothicx-guest = gothicx-guest <gothicx-guest at gothicx-guest>
+snapy-guest = snapy-guest <snapy-guest at snapy-guest>
+sdt = sdt <unknown at example.com>
+jorda-guest = Jordà Polo <jorda at ettin.org>
+persia-guest = persia-guest <persia-guest at example.com>
+tobi = Tobias Frost <tobi at debian.org>
+tobi-guest = Tobias Frost <tobi at debian.org>
+arthur-guest = Arthur Loiret <arthur.loiret at gmail.com>
+sistpoty = Stefan Potyra <sistpoty at ubuntu.com>
+sistpoty-guest = Stefan Potyra <sistpoty at ubuntu.com>
+bdefreese = Barry deFreese <bdefreese at debian.org>
+bdefreese-guest = Barry deFreese <bdefreese at debian.org>
+beberking = Bertrand Marc <beberking at gmail.com>
+beberking-guest = Bertrand Marc <beberking at gmail.com>
+bbk-guest = Bertrand Marc <beberking at gmail.com>
+baby-guest = Miriam Ruiz <little_miry at yahoo.es>
+baby-guest-guest = Miriam Ruiz <little_miry at yahoo.es>
+eddyp-guest = Eddy Petrișor <eddy.petrisor at gmail.com>
+eddyp-guest-guest = Eddy Petrișor <eddy.petrisor at gmail.com>
+tobi = Tobias Frost <tobi at debian.org>
+tobi-guest = Tobias Frost <tobi at debian.org>
+goneri = Gonéri Le Bouder <goneri at rulezlan.org>
+goneri-guest = Gonéri Le Bouder <goneri at rulezlan.org>
+tolimar = Alexander Reichle-Schmehl<tolimar at debian.org>
+linas-guest = Linas Žvirblis <0x0007 at gmail.com>
+

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/svn-to-git.git



More information about the Pkg-games-commits mailing list