We Recommend

Beginning VB.NET Beginning VB.NET
Visual Basic .NET is the latest version of the most widely used programming language in the world, popular with professional developers and complete beginners alike. This book will teach you Visual Basic .NET from first principles. You'll quickly and easily learn how to write Visual Basic .NET code and create attractive windows and forms for the users of your applications.


Posted By

thebugslayer on 09/29/07


Tagged

svn


Versions (?)


svnremove.groovy Remove all svn removed files from working dir


Published in: Groovy 


  1. #!/usr/bin/env groovy
  2.  
  3. // Remove all svn removed files from working dir
  4. def wd = args.size()>0 ? args[0] : '.'
  5. def svnStatusCmd = "svn st $wd"
  6. def svnRemoveCmd = "svn rm "
  7.  
  8. svnStatusCmd.execute().text.split("\n").each{ line ->
  9. matcher = (line =~ /^\!\s+(.+)$/)
  10. if(matcher.find()){
  11. def file = matcher.group(1)
  12. def cmd = svnRemoveCmd + " " + file
  13. print cmd.execute().text
  14. }
  15. }

Report this snippet 

You need to login to post a comment.