Remove .svn files recursively
find . -type d -name '.svn' -exec rm -rf {} \;
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)
find . -type d -name '.svn' -exec rm -rf {} \;
find . -path .svn -prune -o -name *.php | xargs grep foo
find . -name *.php -exec sed -i 's/oldtext/newtext/g' {} \; find . -name .svn -prune -o -exec sed -i 's/oldtext/newtext/g' {} \;
#!/bin/sh svn remove log/* svn commit -m"removing log files" svn propset svn:ignore "*.log" log/ svn update log/ svn commit -m 'Ignoring all files in /log/ ending in .log' svn move config/database.yml config/database.example svn commit -m 'Moving database.yml to database.example to provide a template for anyone who checks out the code' svn propset svn:ignore "database.yml" config/ svn update config/ svn commit -m 'Ignoring database.yml' svn remove tmp/* svn propset svn:ignore "*" tmp/ svn update tmp/ svn commit -m "ignore tmp/ content from now" svn propset svn:ignore ".htaccess" config/ svn update config/ svn commit -m 'Ignoring .htaccess' svn propset svn:ignore "dispatch.fcgi" config/ svn update config/ svn commit -m 'Ignoring dispatch.fcgi'
require 'pathname' def recurse(dir) for child in dir.children next unless child.directory? # ignore files next if child.basename.to_s == '.svn' # ignore .svn directory next unless (child + '.svn').exist? # ignore unadded directories text_base_dir = child + '.svn/text-base' # path to text-base dir next if text_base_dir.exist? # ignore existing text-base dirs text_base_dir.mkdir puts text_base_dir recurse child end end recurse Pathname.new('.')
svnadmin dump repositoryPath > repository.dumpfile
cd /path/to/new-repository-parent-directory svnadmin create repository-name svnadmin load repository-name < repository.dumpfile
svn switch --relocate oldurl newurl
svn switch --relocate http://myoldcrapserver.com/svn/myfunkyproj svn+ssh://mykickingnewserver.com/var/svn/myfunkyproj
svn cat -r [REV] mydir/myfile > mydir/myfile
<IfModule mod_rewrite.c> RewriteRule ^(.*/)?\.svn/ - [F,L] ErrorDocument 403 "Access Forbidden" </IfModule>
<DirectoryMatch "^/.*/(\.svn|CVS)/"> Order deny,allow Deny from all </DirectoryMatch>