Showing posts with label subversion. Show all posts
Showing posts with label subversion. Show all posts

June 21, 2009

Powershell and Subversion

This is a neat trick on how to have post-commit email send to you via Powershell.

June 18, 2009

Remove SVN folder using Powershell

I use subversion as my source code repository and it generates a svn folder. There are times where I would just like to remove all svn folders and files attached to this. Here is a simple one liner in powershell to do just that:
gci 'C:\_DevCode\CustomApps' -include _svn -recurse -force | foreach ($_) { del $_.fullname -recurse -force -whatif}
Three things:
  1. -whatif will do the simulation, so please remove when you are reay to run
  2. My folders for svn were setup as _svn while the default is actually .svn, so you may need to modify that
  3. -force will make sure to get rid of hidden files
You can also use this same code for example to search your machine and get rid of thumbs.db!
gci 'C:\' -include thumbs.db -recurse -force | foreach ($_) { del $_.fullname -recurse -force -whatif}