diff --git a/svn-bisect-setup.sh b/svn-bisect-setup.sh new file mode 100755 index 0000000..6a9acd6 --- /dev/null +++ b/svn-bisect-setup.sh @@ -0,0 +1,105 @@ +#!/bin/bash + +wget http://search.cpan.org/CPAN/authors/id/I/IN/INGY/IO-All-0.39.tar.gz +wget http://search.cpan.org/CPAN/authors/id/I/IN/INGY/YAML-0.68.tar.gz +wget http://search.cpan.org/CPAN/authors/id/A/AU/AUDREYT/YAML-Syck-1.07.tar.gz +wget http://search.cpan.org/CPAN/authors/id/I/IN/INFINOID/App-SVN-Bisect-0.8.tar.gz +tar zxf IO-All-0.39.tar.gz +tar zxf YAML-0.68.tar.gz +tar zxf YAML-Syck-1.07.tar.gz +tar zxf App-SVN-Bisect-0.8.tar.gz +cd IO-All-0.39 +perl Makefile.PL +make +make test +sudo make install +cd .. +cd YAML-0.68 +perl Makefile.PL +make +make test +sudo make install +cd .. +cd YAML-Syck-1.07 +perl Makefile.PL +make +make test +sudo make install +cd .. +cd App-SVN-Bisect-0.8 +perl Makefile.PL +make +make test +sudo make install +cd .. +rm -rf IO-All-0.39* +rm -rf YAML-0.68* +rm -rf YAML-Syck-1.07* +rm -rf App-SVN-Bisect-0.8* + + +exit +# +# Poorman's svn-bisect +# +# Would not suggest using this as it does not take in to account +# revision numbers in a branch are not always contiguous. +# + +#!/bin/sh -e +# +# Copyright (C) 2008 Robert Millan +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + + +get_curr_rev () +{ + svn info | sed -ne "s/^Revision: //p" +} + +case $1 in + start) + rm -rf .svn-bisect + mkdir .svn-bisect + ;; + bad|good) + what=$1 + shift + if [ "$1" = "" ] ; then + get_curr_rev > .svn-bisect/$what + else + echo $1 > .svn-bisect/$what + fi + ;; +esac + +if ! test -e .svn-bisect/good || ! test -e .svn-bisect/bad ; then + exit 0 +fi + +good=`cat .svn-bisect/good` +bad=`cat .svn-bisect/bad` +target=$(((${good}+${bad})/2)) + +if [ "$target" = "$good" ] ; then + echo "Regression found!" + echo "Last good revision: $good" + echo "First bad revision: $bad" + exit 0 +fi + +svn up -r $target + +