/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:31:13 UTC
  • mto: (0.15.1 unshelve)
  • mto: This revision was merged to the branch mainline in revision 3820.
  • Revision ID: aaron@aaronbentley.com-20081005153113-ximu1b7olr055ypp
Test deleting and unversioning

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
    new_name = dict((k, v.encode('utf-8')) for k, v in tt._new_name.items())
7
7
    new_executability = dict((k, int(v)) for k, v in
8
8
                             tt._new_executability.items())
 
9
    tree_path_ids = dict((k.encode('utf-8'), v)
 
10
                         for k, v in tt._tree_path_ids.items())
9
11
    attribs = {
10
12
        '_id_number': tt._id_number,
11
13
        '_new_name': new_name,
12
14
        '_new_parent': tt._new_parent,
13
15
        '_new_executability': new_executability,
14
16
        '_new_id': tt._new_id,
 
17
        '_tree_path_ids': tree_path_ids,
 
18
        '_removed_id': list(tt._removed_id),
 
19
        '_removed_contents': list(tt._removed_contents),
15
20
        }
16
21
    serializer = pack.ContainerSerialiser()
17
22
    yield serializer.begin()
49
54
            tt.create_file(content, trans_id)
50
55
        if kind == 'directory':
51
56
            tt.create_directory(trans_id)
 
57
    tt._tree_path_ids = {}
 
58
    tt._tree_id_paths = {}
 
59
    for bytepath, trans_id in attribs['_tree_path_ids'].items():
 
60
        path = bytepath.decode('utf-8')
 
61
        tt._tree_path_ids[path] = trans_id
 
62
        tt._tree_id_paths[trans_id] = path
 
63
    tt._removed_id = set(attribs['_removed_id'])
 
64
    tt._removed_contents = set(attribs['_removed_contents'])