MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / commit

Method commit

src/main/java/field/utility/Versioning.kt:10–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8 val PARENT = "__PARENT__"
9
10 fun commit(box: Box) {
11 val inplay = box.properties.map.keys.filter { it.name.startsWith(VERSION) }.map { it.name.replaceFirst(VERSION, "") }
12 if (inplay.isEmpty()) return
13
14 inplay.forEach {
15 // PARENT is now the hand edited file, this is the edited version of VERSION
16 box.properties.put(Dict.Prop(PARENT + it), copy<Any>(box.properties.get(Dict.Prop(it))))
17 }
18 }
19
20 fun clearAllFailure(root: Box) {
21 root.breadthFirst(root.allDownwardsFrom()).forEach { clearFailure(it) }

Callers

nothing calls this directly

Calls 7

copyFunction · 0.85
PropMethod · 0.80
getMethod · 0.65
mapMethod · 0.45
isEmptyMethod · 0.45
forEachMethod · 0.45
putMethod · 0.45

Tested by

no test coverage detected