[Bps-public-commit] BPS git mailer tools branch, master, updated. e64e0fa4f095cba9f61cc5b1d1ececef4825a068

jesse jesse at bestpractical.com
Sat Apr 11 23:37:01 EDT 2009


The branch, master has been updated
       via  e64e0fa4f095cba9f61cc5b1d1ececef4825a068 (commit)
      from  5a27c71145ea8eaee314134b9c281180d3ae112d (commit)

Summary of changes:
 authors.txt |   19 +++++++++++++++++++
 create-repo |    7 +++++++
 svn-to-git  |   25 +++++++++++++++++++++++++
 3 files changed, 51 insertions(+), 0 deletions(-)
 create mode 100644 authors.txt
 create mode 100644 svn-to-git

- Log -----------------------------------------------------------------
commit e64e0fa4f095cba9f61cc5b1d1ececef4825a068
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Sat Apr 11 23:36:38 2009 -0400

    added auto-github setup (except for repo creation)
    added first pass of svn convrsion script

diff --git a/authors.txt b/authors.txt
new file mode 100644
index 0000000..f26d5c1
--- /dev/null
+++ b/authors.txt
@@ -0,0 +1,19 @@
+schwern = Michael Schwern <schwern at bestpractical.com>
+zev = Zev Benjamin <zev at bestpractical.com>
+kevinr = Kevin Riggle <kevinr at bestpractical.com>
+autrijus = Audrey Tang <audreyt at audreyt.org>
+audreyt = Audrey Tang <audreyt at audreyt.org>
+glasser = David Glasser <glasser at bestpractical.com>
+trs = Thomas Sibley <trs at bestpractical.com>
+jesse = Jesse Vincent <jesse at bestpractical.com>
+clkao = Chia-liang Kao <clkao at bestpractical.com>
+nelhage = Nelson Elhage <nelhage at bestpractical.com>
+alexmv = Alex Vandiver <alexmv at bestpractical.com>
+sartak = Shawn Moore <sartak at bestpractical.com>
+sunnavy = sunnavy <sunnavy at bestpractical.com>
+cwest = Casey West <casey at geeknest.com>
+www-data = Unknown user <nobody at localhost>
+simonw = Simon Wistow <simon at thegestalt.org>
+spang = Christine Spang <spang at bestpractical.com>
+ruz = Ruslan Zakirov <ruz at bestpractical.com>
+falcone = Kevin Falcone <falcone at bestpractical.com>
diff --git a/create-repo b/create-repo
index ef12e18..d04f35b 100755
--- a/create-repo
+++ b/create-repo
@@ -7,6 +7,10 @@ if [ "foo$REPO" == "foo" ]; then
     exit;
 fi
 
+REPO=`perl -e"print lc '$REPO'"`
+
+echo $REPO
+
 ssh fsck.com "ls -d /git/$REPO.git" > /dev/null 2>&1
 
 if [ "$?" == "0" ]; then
@@ -32,9 +36,12 @@ ssh fsck.com "\
     cd /git/$REPO.git/hooks && \
     rm -rf /tmp/git-init-$TEMP && \
     echo \". /usr/local/git-mailer/post-receive-email\" >> post-receive && \
+    echo \"sudo -u git -H /usr/bin/git push github >>/home/git/pushlog 2>&1\" && \
     git config --add hooks.mailinglist bps-internal-svn at lists.bestpractical.com && \
     git config --add hooks.emailprefix '' && \
     git config --add hooks.showrev \"git show -C %s; echo \" && \
+    git remote add --mirror github git at github.com:bestpractical/${REPO}.git && \
     chmod +x post-receive
     "
 
+echo "Please visit github as bestpractical and create a repo called $REPO"
diff --git a/svn-to-git b/svn-to-git
new file mode 100644
index 0000000..b476c78
--- /dev/null
+++ b/svn-to-git
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+REPO=$1
+
+if [ "foo$REPO" == "foo" ]; then
+    echo "You need to specify a repo name"
+    exit;
+fi
+
+GIT_REPO=`perl -e"print lc '$REPO'"`
+
+echo "Migrating svn repo $REPO to git repo  $GIT_REPO"
+
+
+
+git svn clone --authors-file=/Users/jesse/git/bps/git-mailer.git/authors.txt \
+    svn://svn.bestpractical.com/${REPO} /tmp/svn-${REPO} && \
+git clone git+ssh://diesel.bestpractical.com/git/${GIT_REPO}.git /tmp/git-${GIT_REPO} && \
+cd /tmp/git-${GIT_REPO} && \
+git pull /tmp/svn-${REPO}/ master && \
+git push &&
+ssh fsck.com "cd /git/${GIT_REPO}.git ; sudo chgrp -R rt-pub-svn . ;  sudo -u git -H /usr/bin/git push github"
+echo "Please check the conversion."
+echo "If you're happy, run:"
+echo "svn rm -m 'Moved to git' svn+ssh://svn.bestpractical.com/svn/bps-public/$REPO"

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list