/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: Robert Collins
  • Date: 2010-05-06 11:08:10 UTC
  • mto: This revision was merged to the branch mainline in revision 5223.
  • Revision ID: robertc@robertcollins.net-20100506110810-h3j07fh5gmw54s25
Cleaner matcher matching revised unlocking protocol.

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