'Set a tree entry by name.
:param name: The name of the entry, as a string.
:param value: A tuple of (mode, hexsha), where mode is the mode of the
entry as an integral type and hexsha is the hex SHA of the entry as
a string.'

def __setitem__(self, name, value):

    (mode, hexsha) = value
    self._entries[name] = (mode, hexsha)
    self._needs_serialization = True
