Commit 6b4e244a authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent e6323dbe
...@@ -153,7 +153,7 @@ def Trees(zstor, r): ...@@ -153,7 +153,7 @@ def Trees(zstor, r):
tree = zctx.root['treegen/tree'] = XLOTree() tree = zctx.root['treegen/tree'] = XLOTree()
at0 = commit('treegen/tree: init') at0 = commit('treegen/tree: init')
print("start @%s tree=%s" % (ashex(at0), ashex(tree._p_oid))) xprint("start @%s tree=%s" % (ashex(at0), ashex(tree._p_oid)))
while 1: while 1:
treetxt = r.readline() treetxt = r.readline()
...@@ -406,6 +406,12 @@ def cmd_trees(argv): ...@@ -406,6 +406,12 @@ def cmd_trees(argv):
Trees(zstor, sys.stdin) Trees(zstor, sys.stdin)
# xprint prints msg to stdout and flushes it.
def xprint(msg):
print(msg)
sys.stdout.flush()
cmdRegistry = { cmdRegistry = {
'allstructs': cmd_allstructs, 'allstructs': cmd_allstructs,
'trees': cmd_trees, 'trees': cmd_trees,
......
...@@ -86,7 +86,7 @@ func StartTreeGen(zurl string) (_ *TreeGen, err error) { ...@@ -86,7 +86,7 @@ func StartTreeGen(zurl string) (_ *TreeGen, err error) {
} }
return nil, err return nil, err
} }
defer xerr.Context(&err, "invalid start %q") defer xerr.Contextf(&err, "invalid start %q", start)
// start @<at> tree=<root> // start @<at> tree=<root>
startRe := regexp.MustCompile(`^start @([^ ]+) root=([^ ]+)$`) startRe := regexp.MustCompile(`^start @([^ ]+) root=([^ ]+)$`)
...@@ -103,6 +103,7 @@ func StartTreeGen(zurl string) (_ *TreeGen, err error) { ...@@ -103,6 +103,7 @@ func StartTreeGen(zurl string) (_ *TreeGen, err error) {
return nil, fmt.Errorf("root: %s", err) return nil, fmt.Errorf("root: %s", err)
} }
fmt.Printf("XXX started @%s root=%s\n", tg.head, tg.treeRoot)
return tg, nil return tg, nil
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment