~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Martin Pool
  • Date: 2011-06-14 02:21:41 UTC
  • mto: This revision was merged to the branch mainline in revision 6001.
  • Revision ID: mbp@canonical.com-20110614022141-18hmm7s0iw3utcbj
Deprecate __contains__ on Tree and Inventory

Show diffs side-by-side

added added

removed removed

Lines of Context:
796
796
                                      require_versioned=True)
797
797
            # find_ids_across_trees may include some paths that don't
798
798
            # exist in 'tree'.
799
 
            entries = sorted((tree.id2path(file_id), tree.inventory[file_id])
800
 
                             for file_id in file_ids if file_id in tree)
 
799
            entries = sorted(
 
800
                (tree.id2path(file_id), tree.inventory[file_id])
 
801
                for file_id in file_ids if tree.has_id(file_id))
801
802
        else:
802
803
            entries = tree.inventory.entries()
803
804
 
2150
2151
        basis_inv = basis.inventory
2151
2152
        inv = wt.inventory
2152
2153
        for file_id in inv:
2153
 
            if file_id in basis_inv:
 
2154
            if basis_inv.has_id(file_id):
2154
2155
                continue
2155
2156
            if inv.is_root(file_id) and len(basis_inv) == 0:
2156
2157
                continue