[Bps-public-commit] BPS git mailer tools branch, master, updated. 0068943b7b4bc5cb47b96f4353d8d6d5fe010a37
jesse
jesse at bestpractical.com
Sun Apr 12 01:12:42 EDT 2009
The branch, master has been updated
via 0068943b7b4bc5cb47b96f4353d8d6d5fe010a37 (commit)
via 48e3d3fbf01d4f55607a3f3bbe0ef6245d35fdc6 (commit)
via 89ee37f290e2e67ca09e4d9f02ecd4e48f3d4ef0 (commit)
from e64e0fa4f095cba9f61cc5b1d1ececef4825a068 (commit)
Summary of changes:
README | 11 +++++++++++
authors.txt | 1 +
create-repo | 9 +++++----
svn-to-git | 17 ++++++++++-------
4 files changed, 27 insertions(+), 11 deletions(-)
- Log -----------------------------------------------------------------
commit 89ee37f290e2e67ca09e4d9f02ecd4e48f3d4ef0
Author: Jesse Vincent <jesse at bestpractical.com>
Date: Sun Apr 12 00:21:28 2009 -0400
autodetect svn layout (only a trunk or trunk/branches/tags)
diff --git a/svn-to-git b/svn-to-git
index b476c78..6145e3a 100644
--- a/svn-to-git
+++ b/svn-to-git
@@ -11,13 +11,13 @@ GIT_REPO=`perl -e"print lc '$REPO'"`
echo "Migrating svn repo $REPO to git repo $GIT_REPO"
+svn ls svn://svn.bestpractical.com/${REPO}/trunk 2>/dev/null && OPTS="--stdlayout"
-
-git svn clone --authors-file=/Users/jesse/git/bps/git-mailer.git/authors.txt \
+git svn clone $OPTS --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 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."
commit 48e3d3fbf01d4f55607a3f3bbe0ef6245d35fdc6
Author: Jesse Vincent <jesse at bestpractical.com>
Date: Sun Apr 12 00:22:12 2009 -0400
actually create the github push post-commit hook
diff --git a/create-repo b/create-repo
index d04f35b..6a82d42 100755
--- a/create-repo
+++ b/create-repo
@@ -1,13 +1,13 @@
#!/bin/sh
-REPO=$1
+RAW_REPO=$1
-if [ "foo$REPO" == "foo" ]; then
+if [ "foo$RAW_REPO" == "foo" ]; then
echo "You need to specify a repo name"
exit;
fi
-REPO=`perl -e"print lc '$REPO'"`
+REPO=`perl -e"print lc '$RAW_REPO'"`
echo $REPO
@@ -24,6 +24,7 @@ ssh fsck.com "\
mkdir /git/$REPO.git && \
cd /git/$REPO.git && \
git init --shared --bare && \
+ echo "$RAW_REPO" > description && \
chgrp -R rt-pub-svn /git/$REPO.git && \
mkdir /tmp/git-init-$TEMP && \
cd /tmp/git-init-$TEMP && \
@@ -36,7 +37,7 @@ 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\" && \
+ echo \"sudo -u git -H /usr/bin/git push github >>/home/git/pushlog 2>&1\" >> 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 \" && \
commit 0068943b7b4bc5cb47b96f4353d8d6d5fe010a37
Author: Jesse Vincent <jesse at bestpractical.com>
Date: Sun Apr 12 01:03:49 2009 -0400
update svn-to-git to use git-svn-abandon for nicer conversions
diff --git a/README b/README
index 9516e01..4359a3f 100644
--- a/README
+++ b/README
@@ -1,3 +1,9 @@
+svn-to-git requires:
+
+http://github.com/nothingmuch/git-svn-abandon/tree/master
+
+
+
post-receive-email is a modified verson of the script
shipping in contrib/hooks from git-1.6.1
@@ -24,8 +30,13 @@ To use it, you need to invoke it from
-----------------
To push to github
+
Create the repo on the github account.
+
+(this is all autmated now):
+
+
On diesel, in the repo's dir:
git remote add --mirror github git at github.com:bestpractical/projectname.git
..replacing projectname with the repo's name, obviously.
diff --git a/authors.txt b/authors.txt
index f26d5c1..ec18b7f 100644
--- a/authors.txt
+++ b/authors.txt
@@ -1,4 +1,5 @@
schwern = Michael Schwern <schwern at bestpractical.com>
+robert = Robert Spier <robert at bestpractical.com>
zev = Zev Benjamin <zev at bestpractical.com>
kevinr = Kevin Riggle <kevinr at bestpractical.com>
autrijus = Audrey Tang <audreyt at audreyt.org>
diff --git a/svn-to-git b/svn-to-git
index 6145e3a..692f104 100644
--- a/svn-to-git
+++ b/svn-to-git
@@ -13,13 +13,16 @@ echo "Migrating svn repo $REPO to git repo $GIT_REPO"
svn ls svn://svn.bestpractical.com/${REPO}/trunk 2>/dev/null && OPTS="--stdlayout"
-git svn clone $OPTS --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} && \
-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"
+cd /tmp/svn-${REPO} && \
+git svn-abandon-fix-refs && \
+touch .git/info/grafts && \
+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"
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