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

jesse jesse at bestpractical.com
Tue Apr 21 22:54:17 EDT 2009


The branch, master has been updated
       via  153e9304e473bdde01cbdfae28b67d1711452008 (commit)
       via  0740d051c0b56618d6c620c107765741de55e06b (commit)
       via  1bf3f83a098af9ddffde04c85988b07a61d6efc5 (commit)
      from  0db40a378f49800642ababa47b0d51ca7fcbffa3 (commit)

Summary of changes:
 authors.txt                        |    7 +++++++
 create-github-repo                 |   17 +++++++++++++++++
 create-repo => create-private-repo |   18 +++++++-----------
 migrate-simple                     |    5 +++++
 svn-to-git                         |    5 ++---
 5 files changed, 38 insertions(+), 14 deletions(-)
 create mode 100755 create-github-repo
 copy create-repo => create-private-repo (60%)
 create mode 100755 migrate-simple

- Log -----------------------------------------------------------------
commit 1bf3f83a098af9ddffde04c85988b07a61d6efc5
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Sun Apr 12 17:10:42 2009 -0400

    made the github push a manual step after verification

diff --git a/svn-to-git b/svn-to-git
index 99c9a77..e657e1f 100644
--- a/svn-to-git
+++ b/svn-to-git
@@ -29,8 +29,8 @@ sh -c "$CLEANUP_CMD" && \
 git svn-abandon-cleanup  && \
 ssh fsck.com "cd /git/${GIT_REPO}.git; git config receive.denyNonFastforwards false" && \
 git push --mirror git+ssh://diesel.bestpractical.com/git/${GIT_REPO}.git &&
-ssh fsck.com "cd /git/${GIT_REPO}.git; git config receive.denyNonFastforwards true" && \
-ssh fsck.com "cd /git/${GIT_REPO}.git ; sudo -u git -H /usr/bin/git push github"
+ssh fsck.com "cd /git/${GIT_REPO}.git; git config receive.denyNonFastforwards true" 
 echo "Please check the conversion."
 echo "If you're happy, run:"
+echo "ssh fsck.com \"cd /git/${GIT_REPO}.git ; sudo -u git -H /usr/bin/git push github\""
 echo "svn rm -m 'Moved to git: git+ssh://diesel.bestpractical.com/git/${GIT_REPO}.git OR http://github.com/bestpractical/${GIT_REPO}' svn+ssh://svn.bestpractical.com/svn/bps-public/$REPO"

commit 0740d051c0b56618d6c620c107765741de55e06b
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Sun Apr 12 17:13:26 2009 -0400

    git push is automatic thanks to repo setup

diff --git a/svn-to-git b/svn-to-git
index e657e1f..f53a0fb 100644
--- a/svn-to-git
+++ b/svn-to-git
@@ -32,5 +32,4 @@ git push --mirror git+ssh://diesel.bestpractical.com/git/${GIT_REPO}.git &&
 ssh fsck.com "cd /git/${GIT_REPO}.git; git config receive.denyNonFastforwards true" 
 echo "Please check the conversion."
 echo "If you're happy, run:"
-echo "ssh fsck.com \"cd /git/${GIT_REPO}.git ; sudo -u git -H /usr/bin/git push github\""
 echo "svn rm -m 'Moved to git: git+ssh://diesel.bestpractical.com/git/${GIT_REPO}.git OR http://github.com/bestpractical/${GIT_REPO}' svn+ssh://svn.bestpractical.com/svn/bps-public/$REPO"

commit 153e9304e473bdde01cbdfae28b67d1711452008
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Wed Apr 22 11:53:58 2009 +0900

    updated tools

diff --git a/authors.txt b/authors.txt
index b192868..6c95972 100644
--- a/authors.txt
+++ b/authors.txt
@@ -1,4 +1,5 @@
 root = Somebody at Best Practical <root at bestpractical.com>
+svnco = Somebody at Best Practical <root at bestpractical.com>
 richardc = Richard Clamp <richardc at unixbeard.net>
 schwern = Michael Schwern <schwern at bestpractical.com>
 robert = Robert Spier <robert at bestpractical.com>
@@ -28,3 +29,9 @@ 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>
+a.r.ferreira at gmail.com = A. R. Ferreira <a.r.ferreira at gmail.com>
+jrockway = Jonathan Rockway <jon at jrock.us>
+leira = Linda Julien <leira at bestpractical.com>
+tobix = Tobias Brox <tobix at funcom.com>
+pdh = Phil Homewood <pdh at bestpractical.com>
+acme = Leon Brocard <acme at astray.com>
diff --git a/create-github-repo b/create-github-repo
new file mode 100755
index 0000000..aece22c
--- /dev/null
+++ b/create-github-repo
@@ -0,0 +1,17 @@
+#!/usr/bin/env perl
+
+my $dist = shift @ARGV || die "no dist specified";
+
+use WWW::Mechanize;
+           my $mech = WWW::Mechanize->new();
+    $mech->get('https://github.com/login');
+           $mech->submit_form(
+               form_number => 2,
+               fields    => { login => 'bestpractical', password => '$vk43v3r' },
+           );
+    $mech->get('https://github.com/repositories/new');
+    $mech->submit_form(
+    form_number => 3,
+    fields => { 'repository[name]' => $dist, 'repository[homepage]' => 'http://search.cpan.org/dist/'.$dist },
+);
+
diff --git a/create-private-repo b/create-private-repo
new file mode 100755
index 0000000..202c183
--- /dev/null
+++ b/create-private-repo
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+RAW_REPO=$1
+
+if [ "foo$RAW_REPO" == "foo" ]; then
+    echo "You need to specify a repo name"
+    exit;
+fi
+
+REPO=`perl -e"print lc '$RAW_REPO'"`
+
+echo $REPO
+
+ssh fsck.com "ls -d /git-private/$REPO.git" > /dev/null 2>&1
+
+if [ "$?" == "0" ]; then
+    echo "That repository already exists"
+    exit;
+fi
+
+TEMP=$$
+
+ssh fsck.com "\
+    mkdir /git-private/$REPO.git && \
+    cd /git-private/$REPO.git  && \
+    git init --shared --bare  && \
+    echo "$RAW_REPO" > description && \
+    chgrp -R rt-priv-svn /git-private/$REPO.git && \
+    mkdir /tmp/git-init-$TEMP && \
+    cd /tmp/git-init-$TEMP && \
+    git clone /git-private/$REPO.git && \
+    cd $REPO && \
+    touch .gitignore && \
+    git add .gitignore && \
+    git commit -m 'First post' && \
+    git push origin master && \
+    cd /git-private/$REPO.git/hooks && \
+    rm -rf /tmp/git-init-$TEMP && \
+    echo \". /usr/local/git-mailer/post-receive-email\" >> post-receive && \
+    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 \"
+    chmod +x post-receive
+    "
diff --git a/migrate-simple b/migrate-simple
new file mode 100755
index 0000000..33613d6
--- /dev/null
+++ b/migrate-simple
@@ -0,0 +1,5 @@
+#!/bin/sh
+P=$1
+perl create-github-repo $P
+sh create-repo $P
+sh svn-to-git $P
diff --git a/svn-to-git b/svn-to-git
index f53a0fb..0902a6c 100644
--- a/svn-to-git
+++ b/svn-to-git
@@ -22,7 +22,7 @@ fi
 
 
 
-git svn clone $OPTS --prefix svn/ --authors-file=/Users/jesse/git/bps/git-mailer.git/authors.txt \
+git svn clone $OPTS --prefix svn/ --authors-file=/Users/jesse/git/bps/git-mailer.git/authors.txt  \
     svn://svn.bestpractical.com/${REPO} /tmp/svn-${REPO} && \
 cd /tmp/svn-${REPO} && \
 sh -c "$CLEANUP_CMD" && \

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



More information about the Bps-public-commit mailing list