/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 tools/riodemo.py

  • Committer: Jelmer Vernooij
  • Date: 2018-11-21 03:39:28 UTC
  • mto: This revision was merged to the branch mainline in revision 7206.
  • Revision ID: jelmer@jelmer.uk-20181121033928-ck4sb5zfdwosw35b
Fix test.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
        s.add(prop_name, prop_value)
19
19
    writer.write_stanza(s)
20
20
 
 
21
 
21
22
def write_inventory(writer, inventory):
22
23
    s = Stanza(inventory_version=7)
23
24
    writer.write_stanza(s)
32
33
            attr_val = getattr(ie, attr, None)
33
34
            if attr == 'executable' and attr_val == 0:
34
35
                continue
35
 
            if attr == 'parent_id' and attr_val == 'TREE_ROOT':
 
36
            if attr == 'parent_id' and attr_val == b'TREE_ROOT':
36
37
                continue
37
38
            if attr_val is not None:
38
39
                s.add(attr, attr_val)
41
42
 
42
43
def read_inventory(inv_file):
43
44
    """Read inventory object from rio formatted inventory file"""
44
 
    from bzrlib.inventory import Inventory, InventoryFile
 
45
    from breezy.bzr.inventory import Inventory, InventoryFile
45
46
    s = read_stanza(inv_file)
46
47
    assert s['inventory_version'] == 7
47
48
    inv = Inventory()