Skip to content

Instantly share code, notes, and snippets.

@Riduidel
Created December 4, 2014 09:58
Show Gist options
  • Select an option

  • Save Riduidel/c7705854a21a5800304e to your computer and use it in GitHub Desktop.

Select an option

Save Riduidel/c7705854a21a5800304e to your computer and use it in GitHub Desktop.
Fix svn:mergeinfo by removing it
def files = [
/* Files requiring intervention */
]
def projectDir = /* my project dir */
/**
* I **could** have used svnant (http://subclipse.tigris.org/svnant.html) but as it is not available in any repo, I preferred to directly invoke the command
*/
def ant = new AntBuilder()
files.each { filename ->
def line = "propdel"
println "svn ${line} ${filename}"
ant.exec(outputproperty:"svnOut",
errorproperty: "svnErr",
resultproperty:"svnExit",
failonerror: "true",
dir : projectDir,
executable: 'svn') {
arg(value:line)
arg(value:"svn:mergeinfo")
arg(value:filename)
}
println "${ant.project.properties.svnOut}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment