From: Greg Hudson Date: Mon, 14 May 2012 19:06:51 +0000 (-0400) Subject: Convert util/mkrel to use git instead of svn X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=933798d193ac406b43724f02837e401db09827e3;p=krb5.git Convert util/mkrel to use git instead of svn --- diff --git a/src/util/mkrel b/src/util/mkrel index 0f07dd397..0725963c6 100755 --- a/src/util/mkrel +++ b/src/util/mkrel @@ -1,6 +1,6 @@ #!/bin/sh set -e -repository=svn+ssh://svn.mit.edu/krb5 +repository=git.mit.edu:/git/krb5 dodoc=t dosrc=t checkout=t @@ -94,31 +94,25 @@ echo "major=$relmajor minor=$relminor patch=$relpatch" # $reltag, $release, $reldate are used for brand.c currently # $relmajor, $relminor, $relpatch are used for patchlevel.h currently +if test $checkout = t; then + echo "Checking out krb5 with tag $reltag into directory $reldir..." + git clone -q -n $repository $reldir + (cd $reldir && git checkout -q $reltag --) +fi + # # $newstyle = t if patchlevel.h is the master version stamp file. If # so, we don't edit it here. # -if test $checkout = t; then - if svn cat $repository/$reltag/src/patchlevel.h | grep KRB5_RELDATE > /dev/null 2>&1; then - newstyle=t - else - newstyle=nil; - fi +if grep KRB5_RELDATE $reldir/src/patchlevel.h > /dev/null 2>&1; then + newstyle=t; else - if grep KRB5_RELDATE $reldir/src/patchlevel.h > /dev/null 2>&1; then - newstyle=t; - else - newstyle=nil; - fi + newstyle=nil; fi if test $newstyle = t; then echo "parsing new style patchlevel.h..." - if test $checkout = t; then - eval `svn cat $repository/$reltag/src/patchlevel.h | sed -n 's/#define \([A-Z0-9_]*\)[ \t]*\(.*\)/\1=\2/p'` - else - eval `sed -n 's/#define \([A-Z0-9_]*\)[ \t]*\(.*\)/\1=\2/p' < $reldir/src/patchlevel.h` - fi + eval `sed -n 's/#define \([A-Z0-9_]*\)[ \t]*\(.*\)/\1=\2/p' < $reldir/src/patchlevel.h` if test "$KRB5_RELTAG" != $reltag && \ test "$KRB5_RELTAG" != `echo $reltag|sed 's%[^/]*/%%'` ; then echo "WARNING: patchlevel.h '$KRB5_RELTAG' != $reltag" @@ -135,11 +129,6 @@ else echo "old style patchlevel.h" fi -if test $checkout = t; then - echo "Checking out krb5 with tag $reltag into directory $reldir..." - svn export $repository/$reltag $reldir -fi - echo "Editing release-specific files..." if test $newstyle = t; then @@ -148,7 +137,7 @@ if test $newstyle = t; then #define KRB5_RELDATE "'"$reldate"'"' patchlevel.h > patchlevel.h.new && \ mv patchlevel.h.new patchlevel.h) if test $checkout = t; then - (cd $reldir && svn log -v $repository/$reltag > doc/CHANGES) + (cd $reldir && git log --stat $repository/$reltag > doc/CHANGES) fi else @@ -188,9 +177,9 @@ fi echo "Nuking unneeded files..." find $reldir \( -name TODO -o -name todo -o -name .cvsignore \ - -o -name BADSYMS -o -name .Sanitize -o -name .rconf \) -print \ - | xargs rm -f || true -find $reldir -type d \( -name autom4te.cache -o -name .svn \ + -o -name .gitignore -o -name BADSYMS -o -name .Sanitize \ + -o -name .rconf \) -print | xargs rm -f || true +find $reldir -type d \( -name autom4te.cache -o -name .git \ -o -name \$ac_config_fragdir \) -exec rm -rf {} \; || true if test $dodoc = t; then