comparison init.gradle @ 154:6666e1cd8bae

remove debugging. patch for non-merge dirs
author Dave Smith <smith@nwoca.org>
date Fri, 25 Oct 2013 21:59:01 +0100
parents 8dbc79c5bbb0
children 6389a03379a6
comparison
equal deleted inserted replaced
153:8dbc79c5bbb0 154:6666e1cd8bae
25 gradle.ext.branchName = "" 25 gradle.ext.branchName = ""
26 gradle.ext.branchStream = "" 26 gradle.ext.branchStream = ""
27 27
28 gradle.ext.branchName = "hg branch".execute().text.trim() 28 gradle.ext.branchName = "hg branch".execute().text.trim()
29 def rawParents = 'hg parents'.execute().text 29 def rawParents = 'hg parents'.execute().text
30 println "raw parents: $rawParents" 30 def parent = rawParents.split('\n').find { it.startsWith("branch") }?.split(":")?.getAt(1)?.trim()
31 def parent = rawParents.split('\n').find { it.startsWith("branch") }?.split(":")[1].trim()
32 gradle.ext.branchName = parent ?: gradle.branchName 31 gradle.ext.branchName = parent ?: gradle.branchName
33 32
34 try { 33 try {
35 gradle.ext.hgRepositoryUrl = ("hg path".execute().text.split('=') ?: ['',''] )[1].trim() 34 gradle.ext.hgRepositoryUrl = ("hg path".execute().text.split('=') ?: ['',''] )[1].trim()
36 } catch (e) { } 35 } catch (e) { }