def mktree(self, odb, entries):
        """Create a tree from the given tree entries and safe it to the database."""
        sio = BytesIO()
        tree_to_stream(entries, sio.write)
        sio.seek(0)
        istream = odb.store(IStream(str_tree_type, len(sio.getvalue()), sio))
        return istream.binsha
Create a tree from the given tree entries and safe it to the database.
test/test_fun.py