i have an svn working copy which i executed the following command in

find ./source * -type f -exec sed "s/@version 0.5.3/@version 0.5.4/" -i {} \;

the files are all updated but svn doesn't recognize any change when executing one of theese

svn status ./source

svn diff ./source

svn commit ./source

i also tried to write a script which shpould check the $? from sed and it it's ok the "touch" the file to update it's mdate but sed seems to always return 0 -.-

what can i do now? -.-

link|improve this question
I don't know of a sed implementation that has a -I option. You might have intended the -i option. Is this really the command you ran? – Gilles Sep 12 '10 at 11:58
sorry it was -i, sed itssef is working as i said... – zolex Sep 12 '10 at 12:04
feedback

1 Answer

up vote 0 down vote accepted

The problem lies in your usage of find:

find dir1 -type f

Will match all files in the directory structure, including those inside the .svn directories. The files in .svn are those used to perform the svn diff against. So, in essence, you have modified all copies of the files in the tree, not just the working copies.

Try this syntax:

find ./source * -type f ! -path '*/.svn/*' -exec sed "s/@version 0.5.3/@version 0.5.4/" -I {} \;
link|improve this answer
i don't need backups, all is in svn... – zolex Sep 12 '10 at 12:04
@zolex You misunderstand. All the files in */.svn/text-base/ are backups of the files on the subversion server. DO NOT MODIFY THEM. – amphetamachine Sep 12 '10 at 12:27
ah lol svn is a bitch xD – zolex Sep 12 '10 at 13:21
btw, need to escape the dots on the version regex as it will find other things like 0x523 – zolex Sep 12 '10 at 21:27
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.