# HG changeset patch # User smith@nwoca.org # Date 1419281780 0 # Node ID acd8d3b58440bcaec05e873e11ffc591e1eb3b60 # Parent 358fdd20674a215aa481367a24462a4a16b9b3f4 handle branches while in subproject diff -r 358fdd20674a -r acd8d3b58440 init20.gradle --- a/init20.gradle Mon Dec 22 20:44:29 2014 +0000 +++ b/init20.gradle Mon Dec 22 20:56:20 2014 +0000 @@ -497,7 +497,7 @@ BranchInfo(name) { this.name = name if (!name) { - this.name = determineName() + this.name = determineName() ?: '' } this.name = this.name.replace('@', '-') determineStream() @@ -519,10 +519,8 @@ def parent = rawParents.split('\n').find { it.startsWith("branch") }?.split(":")?.getAt(1)?.trim() return parent ?: branch } catch (e) { - if(new File('.hg/branch').exists()) { - return new File('.hg/branch').text - } else { - return '' + ['.hg/branch', '../.hg/branch'].findResult { + new File(it).exists() ? new File(it).text : null } } }