[Pkg-ocaml-maint-commits] r6161 - /trunk/tools/svn2git/functions.sh
dogguy-guest at users.alioth.debian.org
dogguy-guest at users.alioth.debian.org
Fri Feb 13 15:20:27 UTC 2009
Author: dogguy-guest
Date: Fri Feb 13 15:20:27 2009
New Revision: 6161
URL: http://svn.debian.org/wsvn/?sc=1&rev=6161
Log:
Add more functions to automatize
Modified:
trunk/tools/svn2git/functions.sh
Modified: trunk/tools/svn2git/functions.sh
URL: http://svn.debian.org/wsvn/trunk/tools/svn2git/functions.sh?rev=6161&op=diff
==============================================================================
--- trunk/tools/svn2git/functions.sh (original)
+++ trunk/tools/svn2git/functions.sh Fri Feb 13 15:20:27 2009
@@ -14,6 +14,18 @@
chmod +x ${PKG}.sh
}
+gen_readme () {
+ PKG=$1
+ svn rm --force *
+ mkdir trunk
+ echo "This package has moved to:
+http://git.debian.org/?p=pkg-ocaml-maint/packages/$PKG.git
+git://git.debian.org/git/pkg-ocaml-maint/packages/$PKG.git" > trunk/README
+ svn add trunk
+ svn add trunk/README
+ svn commit -m "Switch $PKG packaging to Git"
+}
+
svn_checkout () {
PKG=`basename "${PWD}"`
svn checkout svn://svn.debian.org/svn/pkg-ocaml-maint/trunk/packages/${PKG} svn
@@ -23,7 +35,15 @@
( mkdir git && cd git && git init )
}
+git_check () {
+ if [ ! -d .git ]; then
+ echo "Go to a git repository!"
+ exit 1
+ fi
+}
+
git_finalize () {
+ git_check
if grep -q UNRELEASED debian/changelog; then
DEBCHANGE_RELEASE_HEURISTIC=changelog dch --no-auto-nmu "Switch packaging to git"
else
@@ -32,7 +52,17 @@
sed -ri 's@^Vcs-Svn: svn://svn.debian.org/svn/pkg-ocaml-maint/trunk/packages/([^/]+)/trunk/?$@Vcs-Git: git://git.debian.org/git/pkg-ocaml-maint/packages/\1.git@' debian/control
sed -ri 's@^Vcs-Browser: http://svn.debian.org/wsvn/pkg-ocaml-maint/trunk/packages/([^/]+)/trunk/?$@Vcs-Browser: http://git.debian.org/?p=pkg-ocaml-maint/packages/\1.git@' debian/control
rm -f debian/svn-deblayout
+ echo "[DEFAULT]
+pristine-tar = True" > debian/gbp.conf
+ git add debian/gbp.conf
git commit -a -m "Switch packaging to git"
git gc --aggressive
git fsck
}
+
+submit_repo () {
+ git_check
+ PKG=`basename "${PWD%/*}"`
+ ( cd ../svn && gen_readme "$PKG" )
+ new-d-o-m-git-repo "$PKG"
+}
More information about the Pkg-ocaml-maint-commits
mailing list