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'.

James Westby jw+debian at jameswestby.net
Sun Jun 24 22:18:20 BST 2007


# Bazaar merge directive format 1
# revision_id: jw+debian at jameswestby.net-20070624211307-\
#   tchngkjgvexjrchz
# target_branch: http://bazaar-vcs.org/bzr/bzr.dev/
# testament_sha1: 8a4dee8a714d924b9c6a58491ff0c7a71985e8f8
# timestamp: 2007-06-24 22:18:14 +0100
# 
# Bazaar revision bundle v0.9
#
# message:
#   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'.
#   
# committer: James Westby <jw+debian at jameswestby.net>
# date: Sun 2007-06-24 22:13:07.759000063 +0100

=== modified file bzrlib/tests/__init__.py
--- bzrlib/tests/__init__.py
+++ bzrlib/tests/__init__.py
@@ -1489,7 +1489,7 @@
         shape = list(shape)             # copy
         for path, ie in inv.entries():
             name = path.replace('\\', '/')
-            if ie.kind == 'dir':
+            if ie.kind == 'directory':
                 name = name + '/'
             if name in shape:
                 shape.remove(name)

=== modified directory  // last-changed:jw+debian at jameswestby.net-2007062421130
... 7-tchngkjgvexjrchz
# revision id: jw+debian at jameswestby.net-20070624211307-tchngkjgvexjrchz
# sha1: 8a4dee8a714d924b9c6a58491ff0c7a71985e8f8
# inventory sha1: 1e9d19807922fd987cce9fae7f236a04774c9ae0
# parent ids:
#   pqm at pqm.ubuntu.com-20070622160825-17gv0lorkzbr3x76
# base id: pqm at pqm.ubuntu.com-20070622160825-17gv0lorkzbr3x76
# properties:
#   branch-nick: bzr.dev




More information about the bazaar mailing list