changeset 179:f9087f939b0a

correct handling of hgflow file when in subproject
author smith@nwoca.org
date Sat, 13 Dec 2014 22:44:49 +0000
parents 5a3a875a1f3e
children 1bdb6e1f2fdb
files init20.gradle
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/init20.gradle	Sat Dec 13 18:43:34 2014 +0000
+++ b/init20.gradle	Sat Dec 13 22:44:49 2014 +0000
@@ -487,7 +487,7 @@
 
 @ToString class BranchInfo {
     def name
-    def stream
+    def stream = "none"
 
     BranchInfo(name) {
         this.name = name
@@ -515,9 +515,10 @@
     }
 
     void determineStream() {
-        if (new File('.hgflow').exists()) {
+        def flowConfig = new File('.hgflow').exists() ? new File('.hgflow') : new File('../.hgflow')
+        if (flowConfig.exists()) {
             def flows = new Properties()
-            flows.load(new File('.hgflow').newReader())
+            flows.load(flowConfig.newReader())
             flows.stringPropertyNames().each {
                 if (!it.startsWith("[") && name.startsWith(flows.getProperty(it))) {
                     stream = it