r77910 - /scripts/takeover-for-pkg-perl.sh

gregoa at users.alioth.debian.org gregoa at users.alioth.debian.org
Wed Jul 27 16:37:28 UTC 2011


Author: gregoa
Date: Wed Jul 27 16:37:24 2011
New Revision: 77910

URL: http://svn.debian.org/wsvn/?sc=1&rev=77910
Log:
convert takeover script from svn to git; take 1.

Modified:
    scripts/takeover-for-pkg-perl.sh

Modified: scripts/takeover-for-pkg-perl.sh
URL: http://svn.debian.org/wsvn/scripts/takeover-for-pkg-perl.sh?rev=77910&op=diff
==============================================================================
--- scripts/takeover-for-pkg-perl.sh (original)
+++ scripts/takeover-for-pkg-perl.sh Wed Jul 27 16:37:24 2011
@@ -8,8 +8,7 @@
 Usage: $BN [options] package...
 
 Options:
-    -t path     (required if trunk doesn't exist in the same dir as scripts) Location of checked out SVN trunk
-    -s URL      SVN trunk URL (default $SVN)
+    -t path     Required; top location of local repository clones (containing packages/)
     -m URL      URL to a message in which the previous maintainer requests the
                 takeover
     -a #        RFA/ITA bug number (conflicts with -m)
@@ -21,23 +20,15 @@
     exit 0
 }
 
-SVN='svn+ssh://svn.debian.org/svn/pkg-perl'
-TRUNK=''
+TOP=''
 MAIL=''
 RFA=''
 
-POSSIBLE_TRUNK="$(readlink -f "$(dirname "$(readlink -f $0)")/../trunk")"
-
-if [ -d "$POSSIBLE_TRUNK" ]; then
-    TRUNK="$POSSIBLE_TRUNK"
-fi
-
-while getopts t:s:m:a:h o; do
+while getopts t:m:a:h o; do
     case $o in
         h) usage;;
         m) MAIL=$OPTARG;;
-        t) TRUNK=$OPTARG;;
-        s) SVN=$OPTARG;;
+        t) TOP=$OPTARG;;
         a) RFA=$OPTARG;;
     esac
 done
@@ -48,7 +39,7 @@
     exit 1
 fi
 
-[ -n "$TRUNK" ] || usage
+[ -n "$TOP" ] || usage
 
 TMP=`mktemp -d`
 
@@ -62,11 +53,14 @@
 *** Taking over $PACKAGE
 ***
 EOF
-    (cd $TMP; apt-get source -t unstable -d $PACKAGE)
+    cd $TMP
+    apt-get source -t unstable -d $PACKAGE
 
-    svn-inject --setprops -l 2 -c 0 -t $TMP/ $TMP/*.dsc $SVN
+    cd $TOP/packages
+    git-import-dsc $TMP/$PACKAGE*.dsc
 
-    svn up $TRUNK/$PACKAGE
+    cd $PACKAGE
+    sh $TOP/alioth-git-repo
 
     TXT="Take over for the Debian Perl Group"
     if [ -n "$MAIL" ]; then
@@ -76,26 +70,25 @@
         TXT="$TXT; Closes: #$RFA -- RFA/ITA"
     fi
 
-    ( cd $TRUNK/$PACKAGE/; svn-buildpackage --svn-tag-only ) # TODO: move this as an option to svn-inject once the string freeze is over
+    dch --no-auto-nmu -i -c debian/changelog "$TXT"
+    git add debian/changelog
+    git commit -m '[takeover-for-pkg-perl] Document the takeover'
 
-    dch --no-auto-nmu -i -c $TRUNK/$PACKAGE/debian/changelog "$TXT"
-
-    svn ci $TRUNK/$PACKAGE/debian/changelog -m '[takeover-for-pkg-perl] Document the takeover'
-
-    if [ -x $TRUNK/../scripts/qa/packagecheck ]; then
-        $TRUNK/../scripts/qa/packagecheck -a -A -C -p "$PACKAGE" "$TRUNK"
+    if [ -x $TOP/../scripts/qa/packagecheck ]; then
+        $TOP/../scripts/qa/packagecheck -a -A -C -p "$PACKAGE" "$TOP"
     else
         echo "Couldn't find packagecheck, skipping..." >/dev/stderr
     fi
 
+    git push
     rm $TMP/*
 }
 
 [ -n "${1:-}" ] || usage
 
+CURPWD=$(pwd)
 while [ -n "${1:-}" ]; do
     inject_package $1
     shift
+    cd $CURPWD
 done
-
-




More information about the Pkg-perl-cvs-commits mailing list