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

.

parent e6323dbe
......@@ -153,7 +153,7 @@ def Trees(zstor, r):
tree = zctx.root['treegen/tree'] = XLOTree()
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:
treetxt = r.readline()
......@@ -406,6 +406,12 @@ def cmd_trees(argv):
Trees(zstor, sys.stdin)
# xprint prints msg to stdout and flushes it.
def xprint(msg):
print(msg)
sys.stdout.flush()
cmdRegistry = {
'allstructs': cmd_allstructs,
'trees': cmd_trees,
......
......@@ -86,7 +86,7 @@ func StartTreeGen(zurl string) (_ *TreeGen, err error) {
}
return nil, err
}
defer xerr.Context(&err, "invalid start %q")
defer xerr.Contextf(&err, "invalid start %q", start)
// start @<at> tree=<root>
startRe := regexp.MustCompile(`^start @([^ ]+) root=([^ ]+)$`)
......@@ -103,6 +103,7 @@ func StartTreeGen(zurl string) (_ *TreeGen, err error) {
return nil, fmt.Errorf("root: %s", err)
}
fmt.Printf("XXX started @%s root=%s\n", tg.head, tg.treeRoot)
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