Posted By

thebugslayer on 09/29/07


Tagged

svn


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

doctorillo


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.