Mercurial > public > develkit
comparison init.gradle @ 147:0a452b0017de
debugging linux
author | Dave Smith <smith@nwoca.org> |
---|---|
date | Fri, 25 Oct 2013 21:37:48 +0100 |
parents | 8ef0a02dd76e |
children | 020db0e76d0d |
comparison
equal
deleted
inserted
replaced
146:8ef0a02dd76e | 147:0a452b0017de |
---|---|
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 |
30 println "raw parents: $parents" | |
31 parents = parents.trim().split(" ") | |
30 println "working directory parents: $parents " | 32 println "working directory parents: $parents " |
31 def parent = parents.find { it != 'default' } | 33 def parent = parents.find { it != 'default' } |
32 gradle.ext.branchName = parent ?: gradle.branchName | 34 gradle.ext.branchName = parent ?: gradle.branchName |
33 gradle.ext.hgRepositoryUrl = ("hg path".execute().text.split('=') ?: ['',''] )[1].trim() | 35 gradle.ext.hgRepositoryUrl = ("hg path".execute().text.split('=') ?: ['',''] )[1].trim() |
34 } catch (e) { println e } | 36 } catch (e) { println e } |