SVN Diff While Ignoring Whitespace
Can be used in a directory:
$ dw
Or on a single file:
$ dw functions.php
alias dw="svn diff --diff-cmd diff -x -uw"
11342 users tagging and storing useful source code snippets
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
alias dw="svn diff --diff-cmd diff -x -uw"
$dir = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(".")); foreach($dir as $file) { $path = $file->getPathname(); if (preg_match('/\.merge-right\.r\d+$/', $path, $matches)) { $orig = str_replace($matches[0], '' , $path); copy($path, $orig); $cmd = "svn resolved $orig"; `$cmd`; } }
# Snagged from http://softiesonrails.com/2007/7/11/upgrading-your-views-to-rails-2-0 for old in `find app/views -name *.rhtml`; do svn mv $old `dirname $old`/`basename $old .rhtml`.html.erb; done
#!/usr/bin/env ruby -wKU # get svn info location svnurl = `svn info | grep "^URL:"`.gsub('URL: ','').chomp # project = basename project = File.basename(Dir.pwd) puts cmd = "git-svn clone #{svnurl} ../#{project}.git" `#{cmd}`
svn log | more svn merge -r339:HEAD https://wush.net/svn/givezooks/trunk
#server side # create the project directory structure outside of svn mkdir -p ~/Documents/code/my-project/{trunk,tags,branches} # create the new repository svnadmin create /var/svn/my-repository # add the new project svn import my-project file:////var/svn/my-repository/my-project # remove the project rm -rf /var/svn/my-repository/my-project #client side # list the contents of my-project svn list --verbose http://my-site.com/svn/my-repository/my-project # *update 29-Oct-07* # it's possible to import, or remove the project from the client-side # add the new project svn import my-project http://my-site.com/svn/my-repository/my-project # remove the project svn delete http://my-site.com/svn/my-repository/my-project
# In this case, ignore contents of 'coverage' folder in current directory. svn propset svn:ignore 'coverage' .
find . -name .svn -print0 | xargs -0 rm -rf
# List all new files svn st | grep ? | sed "s/^? //" # Add all new files svn st | grep ? | sed "s/^? //" | xargs svn add # Another way to add all new files svn add * --force