Thursday, August 13, 2009

recursive svn cleanup!

Did you ever experienced a couple of random directories in your working copy getting locked by svn for no particular reason? And your favorite SVN interface told you 'Directory xxx is locked use svn cleanup'? or for some other reason do you need to run a recursive clean up command?

anywho...
It happened to me more than enough to write a very simple shell script.


#!/bin/bash
mysvnclean() {
if [ -d $1 ]; then
for tmpDescendDir in $1/*
do
if [ -d $tmpDescendDir ] && [ $tmpDescendDir != ".svn" ]; then
svnLookupDir="${tmpDescendDir}/.svn"
if [ -d $svnLookupDir ]; then
echo "$tmpDescendDir"
svn cleanup $tmpDescendDir
mysvnclean $tmpDescendDir
fi
fi
done
fi
}
mysvnclean $1


save this script with "anyname.sh" and run in like
sh anyname.sh /top/path/to/cleanup

Friday, July 31, 2009

George Carlin

"Religion has actually convinced people that there`s an invisible man -- living in the sky -- who watches everything you do, every minute of every day. And the invisible man has a special list of ten things he does not want you to do..And if you do any of these ten things, he has a special place, full of fire and smoke and burning and torture and anguish, where he will send you to live and suffer and burn and choke and scream and cry forever and ever `til the end of time! ...But He loves you."

George Carlin