[Pkg-ocaml-maint-commits] r5918 - /trunk/tools/svn2git/functions.sh

glondu-guest at users.alioth.debian.org glondu-guest at users.alioth.debian.org
Sat Aug 9 15:07:39 UTC 2008


Author: glondu-guest
Date: Sat Aug  9 15:07:39 2008
New Revision: 5918

URL: http://svn.debian.org/wsvn/?sc=1&rev=5918
Log:
Add common functions likely to be used by/with generated shell scripts

Added:
    trunk/tools/svn2git/functions.sh

Added: trunk/tools/svn2git/functions.sh
URL: http://svn.debian.org/wsvn/trunk/tools/svn2git/functions.sh?rev=5918&op=file
==============================================================================
--- trunk/tools/svn2git/functions.sh (added)
+++ trunk/tools/svn2git/functions.sh Sat Aug  9 15:07:39 2008
@@ -1,0 +1,38 @@
+get_log () {
+  PKG=`basename "${PWD}"`
+  svn log -r0:HEAD --xml -v svn://svn.debian.org/svn/pkg-ocaml-maint/trunk/packages/${PKG} > ${PKG}.xml
+}
+
+get_tag_log () {
+  PKG=`basename "${PWD}"`
+  svn log -r0:HEAD --xml -v svn://svn.debian.org/svn/pkg-ocaml-maint/tags/packages/${PKG} > ${PKG}-tags.xml
+}
+
+gen_sh () {
+  PKG=`basename "${PWD}"`
+  glondu_svn2git.py -p ${PKG} -x ${PKG}.xml -y ${PKG}-tags.xml > ${PKG}.sh
+  chmod +x ${PKG}.sh
+}
+
+svn_checkout () {
+  PKG=`basename "${PWD}"`
+  svn checkout svn://svn.debian.org/svn/pkg-ocaml-maint/trunk/packages/${PKG} svn
+}
+
+git_init () {
+  ( mkdir git && cd git && git init )
+}
+
+git_finalize () {
+  if grep -q UNRELEASED debian/changelog; then
+    DEBCHANGE_RELEASE_HEURISTIC=changelog dch --no-auto-nmu "Switching packaging to git"
+  else
+    DEBCHANGE_RELEASE_HEURISTIC=changelog dch -i -D "UNRELEASED" --no-auto-nmu "Switching packaging to git"
+  fi
+  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
+  git commit -a -m "Switching packaging to git"
+  git gc --aggressive
+  git fsck
+}




More information about the Pkg-ocaml-maint-commits mailing list