~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-06-28 19:12:10 UTC
  • mfrom: (5967.7.4 rm-magic-methods)
  • Revision ID: pqm@pqm.ubuntu.com-20110628191210-bwblsxn26kyu3swl
(mbp) remove __contains__ methods from inventory and dict (Martin Pool)

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
 
2154
2155
        basis_inv = basis.inventory
2155
2156
        inv = wt.inventory
2156
2157
        for file_id in inv:
2157
 
            if file_id in basis_inv:
 
2158
            if basis_inv.has_id(file_id):
2158
2159
                continue
2159
2160
            if inv.is_root(file_id) and len(basis_inv) == 0:
2160
2161
                continue