/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to serialize_transform.py

  • Committer: Aaron Bentley
  • Date: 2008-10-05 15:50:16 UTC
  • mto: (0.15.1 unshelve)
  • mto: This revision was merged to the branch mainline in revision 3820.
  • Revision ID: aaron@aaronbentley.com-20081005155016-221daat3lv7iq46d
Implement symlink serialization

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import os
 
2
 
1
3
from bzrlib import pack
2
4
from bzrlib.util import bencode
3
5
 
30
32
                cur_file.close()
31
33
        if kind == 'directory':
32
34
            content = ''
 
35
        if kind == 'symlink':
 
36
            content = os.readlink(tt._limbo_name(trans_id))
33
37
        yield serializer.bytes_record(content, ((trans_id, kind),))
34
38
    yield serializer.end()
35
39
 
54
58
            tt.create_file(content, trans_id)
55
59
        if kind == 'directory':
56
60
            tt.create_directory(trans_id)
 
61
        if kind == 'symlink':
 
62
            tt.create_symlink(content, trans_id)
57
63
    tt._tree_path_ids = {}
58
64
    tt._tree_id_paths = {}
59
65
    for bytepath, trans_id in attribs['_tree_path_ids'].items():