-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hans Verkuil wrote:

> This would be preferable to MythTV because of the more appropriate hostname.
> Again, if someone can take care of the svn access and website stuff, then
> I can fill it. I want to try to put in the whole history from the sourceforge
> CVS repository onwards. Should be possible AFAIK.
> 
> Besides, it's a good excuse to get to know subversion.

Here's a script that can import the tarballs into subversion, given that
you are in the svn working directory.

ex: update-ivtv ../tarballs/*

It will grab the new lines from the 'ChangeLog' and use that for the
commit log.  The 'TAGS' variable may need to be adjusted.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDCP/3/OxZdv/lbNgRAmZAAKCqxOgvTCl/fXVXCGho8pZQ7njHPACfa7Ph
U2Std2RNZ+QjF+I5evTFqfo=
=Mig4
-----END PGP SIGNATURE-----
#!/bin/bash

TAGS=http://localhost/svn/ivtv/tags
TMP=$(mktemp -d)

for tarball; do
        tar -C $TMP -xzf $tarball
        ivtv=$TMP/$(ls $TMP)

        for dir in $(find $ivtv -type d); do
                cp -al ${dir#$ivtv}/.svn $dir 2> /dev/null
        done

        IFS=$'\n'
        for file in $(svn status $ivtv); do
                if [ ${file:0:1} = "?" ]; then
                        svn add ${file:7} > /dev/null
                elif [ ${file:0:1} = "!" ]; then
                        svn rm ${file:7} > /dev/null
                fi
        done

        version=${ivtv#*ivtv-}
        echo "Importing $version"

        svn ci $ivtv -m "$(svn diff $ivtv/ChangeLog | grep '^+[^+]' | sed 
's/^+//g' | sed 's/^#/ /g')" > /dev/null
        rm -rf $ivtv

        eval $(grep 'url=' .svn/entries)
        svn cp $url $TAGS/$version -m "" > /dev/null

        svn update
done

rm -rf $TMP

Reply via email to