Search code examples
svnsmartsvn

SVN: can't sense files when changed through shell script


I apply simple script to change word in some files with another word.

for x in $(find .|grep Makefile) ;
do 
sed -i -e 's/certainWord/anotherword/g' $x ;
done 

the changes occur in the file when I check it manually but when I try to commit svn files it doesn't sense that anyone has changed !

is it a known problem ?

I'm using smart svn tool to commit


Solution

  • I found out the problem. the above script goes through the .svn directories and change the files in it in addition to the files in the working copy. that's why it didn't sense the change. as it seems it compares the working copy with the one under .svn {I'm new to svn :*}

    my solution to that is to ignore the hidden folders to neglect .svn directory

    for x in $(find . -not -path '*/\.*'|grep Makefile) ;
    do 
    sed -i -e 's/certainWord/anotherword/g' $x ;
    done