comparison init.gradle @ 146:8ef0a02dd76e

fix escaping
author Dave Smith <smith@nwoca.org>
date Fri, 25 Oct 2013 21:36:00 +0100
parents cea4e793a3f4
children 0a452b0017de
comparison
equal deleted inserted replaced
145:cea4e793a3f4 146:8ef0a02dd76e
24 gradle.ext.hgRepositoryUrl = "" 24 gradle.ext.hgRepositoryUrl = ""
25 gradle.ext.branchName = "" 25 gradle.ext.branchName = ""
26 gradle.ext.branchStream = "" 26 gradle.ext.branchStream = ""
27 try { 27 try {
28 gradle.ext.branchName = "hg branch".execute().text.trim() 28 gradle.ext.branchName = "hg branch".execute().text.trim()
29 def parents = "hg parents --template \"{branch} \"".execute().text.trim().split(" ") 29 def parents = 'hg parents --template "{branch} "'.execute().text.trim().split(" ")
30 println "working directory parents: $parents " 30 println "working directory parents: $parents "
31 def parent = parents.find { it != 'default' } 31 def parent = parents.find { it != 'default' }
32 gradle.ext.branchName = parent ?: gradle.branchName 32 gradle.ext.branchName = parent ?: gradle.branchName
33 gradle.ext.hgRepositoryUrl = ("hg path".execute().text.split('=') ?: ['',''] )[1].trim() 33 gradle.ext.hgRepositoryUrl = ("hg path".execute().text.split('=') ?: ['',''] )[1].trim()
34 } catch (e) { println e } 34 } catch (e) { println e }