Part of bzrlib.rio View In Hierarchy
to_file can be anything that can be enumerated as a sequence of lines (with newlines.)