comparison init.gradle @ 145:cea4e793a3f4

handle merge working directories (multiple parent branches)
author Dave Smith <smith@nwoca.org>
date Fri, 25 Oct 2013 21:29:39 +0100
parents 7fead80bdd6a
children 8ef0a02dd76e
comparison
equal deleted inserted replaced
144:7fead80bdd6a 145:cea4e793a3f4
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) { } 34 } catch (e) { println e }
35 35
36 36
37 if (file('.hgflow').exists()) { 37 if (file('.hgflow').exists()) {
38 def flows = new Properties() 38 def flows = new Properties()
39 flows.load(file('.hgflow').newReader()) 39 flows.load(file('.hgflow').newReader())