[Pkg-ocaml-maint-commits] r6206 - /trunk/projects/git-guide/d-o-m-mrconfig.sh
dogguy-guest at users.alioth.debian.org
dogguy-guest at users.alioth.debian.org
Thu Feb 19 14:10:54 UTC 2009
Author: dogguy-guest
Date: Thu Feb 19 14:10:53 2009
New Revision: 6206
URL: http://svn.debian.org/wsvn/?sc=1&rev=6206
Log:
Better handling for Git migrations
Modified:
trunk/projects/git-guide/d-o-m-mrconfig.sh
Modified: trunk/projects/git-guide/d-o-m-mrconfig.sh
URL: http://svn.debian.org/wsvn/trunk/projects/git-guide/d-o-m-mrconfig.sh?rev=6206&op=diff
==============================================================================
--- trunk/projects/git-guide/d-o-m-mrconfig.sh (original)
+++ trunk/projects/git-guide/d-o-m-mrconfig.sh Thu Feb 19 14:10:53 2009
@@ -39,6 +39,9 @@
# Setting up mr lib
output "[DEFAULT]
lib=
+ msg () {
+ echo \"I: \$1\"
+ }
git_checkout () {
git clone git+ssh://git.debian.org$GIT_REPODIR\$1.git &&
cd \$1 &&
@@ -49,11 +52,17 @@
svn co $SVN_REPODIR/\$1
}
migration_check () {
- svn update
- if [ -f \"trunk/README\" ] && [[ \"\`cat trunk/README\`\" =~ \"This package has moved\" ]]; then
- cd ..
- rm -rf \${1//packages\//}
- git_checkout \${1//packages\//}
+ if [ ! -d .git ]; then
+ svn update
+ if [ -f \"trunk/README\" ] && [[ \"\`cat trunk/README\`\" =~ \"This package has moved\" ]]; then
+ cd ..
+ msg \"Deleting old svn repository: packages/\$1\"
+ rm -rf \$1
+ msg \"Checkout new git repository\"
+ git_checkout \$1
+ fi
+ else
+ msg \"Nothing to do here.\"
fi
}
"
@@ -62,6 +71,7 @@
for i in $GIT_PKGS; do
output "[packages/$i]
checkout = git_checkout $i
+check = migration_check $i
"
done
@@ -69,7 +79,7 @@
for i in $SVN_REMAINING_PKGS; do
output "[packages/$i]
checkout = svn_checkout packages/$i
-check = migration_check packages/$i
+check = migration_check $i
"
done
More information about the Pkg-ocaml-maint-commits
mailing list