MCPcopy Create free account
hub / github.com/codecombat/codecombat / wombo

Function wombo

scripts/merge-git.py:33–71  ·  view source on GitHub ↗
(tree, path, left, right, center)

Source from the content-addressed store, hash-verified

31center = repo.TreeBuilder(head.tree)
32
33def wombo(tree, path, left, right, center):
34 for e in tree:
35 p2 = path + [e.name];
36 here = "/".join(p2)
37
38 if any(map(lambda p: p.startswith(here), targets)):
39 if here in targets:
40 oid = e.oid
41 nl = e.name
42 nr = nl.replace(".coco.", ".ozar.")
43 nc = nl.replace(".coco.", ".")
44
45 print(nl, nr, nc)
46
47 left.remove(nl)
48 left.insert(nc, oid, GIT_FILEMODE_BLOB)
49
50 right.remove(nr)
51 right.insert(nc, oid, GIT_FILEMODE_BLOB)
52
53 center.remove(nl)
54 center.remove(nr)
55 center.insert(nc, oid, GIT_FILEMODE_BLOB)
56
57
58
59 elif e.type == GIT_OBJ_TREE:
60 l2 = repo.TreeBuilder(tree / e.name)
61 r2 = repo.TreeBuilder(tree / e.name)
62 c2 = repo.TreeBuilder(tree / e.name)
63 wombo(tree / e.name, p2, l2, r2, c2)
64 left.insert(e.name, l2.write(), GIT_FILEMODE_TREE)
65 right.insert(e.name, r2.write(), GIT_FILEMODE_TREE)
66 center.insert(e.name, c2.write(), GIT_FILEMODE_TREE)
67 else:
68 pass
69 else:
70 pass
71 pass
72
73wombo(head.tree, [], left, right, center)
74

Callers 1

merge-git.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected