Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Throw everything in the air, and see where it lands

  • Loading branch information...
commit 1b8fc0be77523106782dfaa5ca5f6090d046cb70 1 parent 3898151
@ssm ssm authored
View
2  convert
@@ -25,3 +25,5 @@ echo ": munin svn2git session ; ${0} ${rootdir}"
# Update "munin" symlink to point to latest successful run.
rm -f munin
ln -s ${rootdir}/munin.svn2git munin
+
+echo 'Success. Follow the "munin" symlink to your new and shiny git repo'
View
32 run.d/10_import_munin
@@ -5,8 +5,6 @@ set -e
# Imports munin trunk, branches and tags into munin.svn2git
-# Moves "master" to "develop", and leaves an empty master branch.
-
pre_check() {
if [ -d munin.svn2git ]; then
echo "Already done, skipping."
@@ -18,42 +16,22 @@ pre_check() {
post_check() {
test -d munin.svn2git
- if [ -f munin.svn2git/.git/index ]; then
- echo "Git index exists after run, this is wrong"
- exit 1
- fi
+ (
+ cd munin.svn2git
+ git branch --list master | grep -qw master
+ )
}
import_from_svn() {
- echo "### Running svn2git..."
svn2git --authors="$SVN2GIT_AUTHORS" \
--exclude=^/branches/debian \
--exclude=^/people \
${SVN2GIT_SVN_REPO}
}
-sanity_check() {
- echo "### Sanity check"
- test -d .git
-}
-
-rename_and_recreate_master() {
- git branch -m master develop
- git symbolic-ref HEAD refs/heads/master
- rm .git/index
- git clean -fdx
-}
-
run_conversion() {
rootdir=$(mktemp -d munin.XXXXXX)
- cd $rootdir
-
- import_from_svn
- sanity_check
- rename_and_recreate_master
-
- cd ..
- test -d munin.svn2git && exit 1 || true
+ ( cd $rootdir && import_from_svn )
mv $rootdir munin.svn2git
}
View
0  run.d/20_import-munin-packaging-simple → run.d/11_import-munin-packaging-simple
File renamed without changes
View
0  run.d/20_import-munin-packaging-lenny → run.d/12_import-munin-packaging-lenny
File renamed without changes
View
0  run.d/20_import-munin-packaging-squeeze → run.d/13_import-munin-packaging-squeeze
File renamed without changes
View
0  run.d/20_import-munin-packaging-experimental → run.d/14_import-munin-packaging-experimental
File renamed without changes
View
0  run.d/30_import-munin-people → run.d/15_import-munin-people
File renamed without changes
View
27 run.d/30_make_develop_branch
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+set -e
+set -u
+
+pre_check() {
+ if ( git branch --list develop | grep -qw develop ); then
+ echo "Already done, skipping..."
+ exit 0
+ fi
+ git branch --list master | grep -qw master
+}
+
+post_check() {
+ git branch --list develop | grep -qw develop
+}
+
+
+make_develop_branch() {
+ git branch --move master develop
+}
+
+cd munin.svn2git
+
+pre_check
+make_develop_branch
+post_check
View
20 run.d/11_merge-tags-to-master → run.d/60_make_master_branch_and_tags
@@ -25,20 +25,18 @@ tags="
1.4.5 1.4.6
2.0-alpha1 2.0-alpha2 2.0-beta1 2.0-beta2 2.0-beta3 2.0-beta4
-2.0-beta5 2.0-beta6 2.0-beta7 2.0-rc1 2.0-rc2 2.0-rc3
+2.0-beta5 2.0-beta6 2.0-beta7 2.0-rc1 2.0-rc2 2.0-rc3 2.0-rc4
"
pre_check() {
- test -d munin.svn2git/.git
- if [ -f munin.svn2git/.git/index ]; then
- echo "Git index exists, this is wrong"
- exit 1
- fi
+ git branch --list develop | grep -qw develop
}
post_check() {
- test -f munin.svn2git/.git/index
+ git branch --list develop | grep -qw develop
+ git branch --list master | grep -qw master
+ test -f .git/index
}
write_git_config() {
@@ -50,8 +48,10 @@ tag_timestamp() {
}
reset_branch() {
- git reset --hard 0.9.9r7
+ git symbolic-ref HEAD refs/heads/master
+ rm .git/index
git clean -fdx
+ git reset --hard 0.9.9r7
}
merge_tag() {
@@ -97,13 +97,15 @@ merge_all_tags() {
}
merge_tags_to_master() {
- cd munin.svn2git
reset_branch
write_git_config
merge_all_tags
git checkout master
}
+
+cd munin.svn2git
+
pre_check
merge_tags_to_master
post_check
View
7 run.d/90_create-debian-branch
@@ -3,9 +3,8 @@
set -e
set -u
-}
packaging=packaging-wheezy
-upstream=2.0-rc3
+upstream=2.0-rc4
pre_check() {
if ( git branch --list debian | grep -q debian ); then
@@ -19,10 +18,12 @@ post_check() {
}
create_packaging_branch() {
- git checkout -b debian $packaging
+ git checkout -B debian $packaging
git merge $upstream
}
+cd munin.svn2git
+
pre_check
create_packaging_branch
post_check
View
3  run.d/99_cleanup
@@ -5,9 +5,8 @@ set -u
cd munin.svn2git
-for branch in packaging-etch packaging-sarge packaging-sid toretest 1.3-flux@1258; do
+for branch in toretest 1.3-flux@1258; do
if ( git branch | grep -qw $branch ); then
git branch -D $branch
fi
done
-
Please sign in to comment.
Something went wrong with that request. Please try again.