~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: James Westby
  • Date: 2007-06-24 21:13:07 UTC
  • mto: (2561.1.1 Aaron's integration)
  • mto: This revision was merged to the branch mainline in revision 2562.
  • Revision ID: jw+debian@jameswestby.net-20070624211307-tchngkjgvexjrchz
Fix detection of directory entries in the inventory.

check_inventory_shape allows you to check that an inventory entry is a
directory by ending it in a '/'. However the code to add the '/' to the
entries for comparison uses the kind == 'dir' to detect directories, when
the key is 'directory'.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1489
1489
        shape = list(shape)             # copy
1490
1490
        for path, ie in inv.entries():
1491
1491
            name = path.replace('\\', '/')
1492
 
            if ie.kind == 'dir':
 
1492
            if ie.kind == 'directory':
1493
1493
                name = name + '/'
1494
1494
            if name in shape:
1495
1495
                shape.remove(name)