Return to Snippet

Revision: 3886
at September 29, 2007 05:08 by thebugslayer


Initial Code
#!/usr/bin/env groovy

// Remove all svn removed files from working dir
def wd = args.size()>0 ? args[0] : '.'
def svnStatusCmd = "svn st $wd"
def svnRemoveCmd = "svn rm "

svnStatusCmd.execute().text.split("\n").each{ line ->
        matcher = (line =~ /^\!\s+(.+)$/)
        if(matcher.find()){
                def file = matcher.group(1)
                def cmd = svnRemoveCmd + " " + file
                print cmd.execute().text
        }
}

Initial URL

                                

Initial Description

                                

Initial Title
svnremove.groovy Remove all svn removed files from working dir

Initial Tags
svn

Initial Language
Groovy