Posts Tagged ‘rcs’

How to delete .SVN files/directories

Thursday, August 13th, 2009

If you're new here, you may want to subscribe to my RSS feed.
Thanks for reading my blog!

This is so common situation when somebody decides to copy a directory that contains SVN files which also has locally modified files.
Therefore a clean export won't do the job.
Here is what I do to clean up the new folder from the SVN files.

This command will display all the .SVN folders starting from the current folder.

Be yourself i.e. not root :D just in case.

find . -type d -name '*.svn' -print

Example Output:

./js/.svn
./templates/.svn
./.svn
./css/.svn
./images/.svn

What I do is check the folders visually and then use my editor to search & replace:
"./" and replace it with "rm -rf ./"

Result:

rm -rf ./js/.svn
rm -rf ./templates/.svn
rm -rf ./.svn
rm -rf ./css/.svn
rm -rf ./images/.svn

Then I paste this in the console window.

rm is a dangerous command so be careful!
Your precious work could be gone in a fraction of a second!

How to export svn editor

Wednesday, April 22nd, 2009

Have you seen this message lately ?

csvn: Commit failed (details follow):
svn: Could not use external editor to fetch log message; consider setting the $SVN_EDITOR environment variable or using the --message (-m) or --file (-F) options
svn: None of the environment variables SVN_EDITOR, VISUAL or EDITOR is set, and no 'editor-cmd' run-time configuration option was found

Here is how to export SVN_EDITOR variable.

Feel free to change the editor to pico, nano etc.

echo export SVN_EDITOR=vi >> ~/.bash_profile

Logout and then Login again to *see* the change.
By *see* I mean that you have to do execute the following command and the editor of your choice should be run for you:

svn ci

Related: