~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to serialize_transform.py

  • Committer: Aaron Bentley
  • Date: 2008-10-05 06:00:52 UTC
  • mto: (0.15.1 unshelve)
  • mto: This revision was merged to the branch mainline in revision 3820.
  • Revision ID: aaron@aaronbentley.com-20081005060052-sbudbn3fz9sr1158
Support serializing/deserializing directories

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
                content = cur_file.read()
21
21
            finally:
22
22
                cur_file.close()
 
23
        if kind == 'directory':
 
24
            content = ''
23
25
        yield serializer.bytes_record(content, ((trans_id, kind),))
24
26
    yield serializer.end()
25
27
 
40
42
    for ((trans_id, kind),), content in iterator:
41
43
        if kind == 'file':
42
44
            tt.create_file(content, trans_id)
 
45
        if kind == 'directory':
 
46
            tt.create_directory(trans_id)