summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2011-07-20 16:31:09 +0200
committerJelmer Vernooij <jelmer@samba.org>2011-07-20 16:31:09 +0200
commitc4cb0914d8bdedfcd3f209f123a83bae1bee0ae8 (patch)
treee502f320ef0fccbab6277863e44c641a540e0ed0
parent924f946fa80a355540d841a4cf56a56787a3ffe5 (diff)
downloadbzr-fastimport-c4cb0914d8bdedfcd3f209f123a83bae1bee0ae8.tar.gz
Avoid deprecated Inventory.__contains__.
-rw-r--r--bzr_commit_handler.py4
-rw-r--r--revision_store.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/bzr_commit_handler.py b/bzr_commit_handler.py
index a3c0896..9e38741 100644
--- a/bzr_commit_handler.py
+++ b/bzr_commit_handler.py
@@ -362,7 +362,7 @@ class GenericCommitHandler(processor.CommitHandler):
% (kind, path))
return
# Record it
- if file_id in inv:
+ if inv.has_id(file_id):
old_ie = inv[file_id]
if old_ie.kind == 'directory':
self.record_delete(path, old_ie)
@@ -404,7 +404,7 @@ class GenericCommitHandler(processor.CommitHandler):
# It's possible that a file or symlink with that file-id
# already exists. If it does, we need to delete it.
- if dir_file_id in inv:
+ if inv.has_id(dir_file_id):
self.record_delete(dirname, ie)
self.record_new(dirname, ie)
return basename, ie.file_id
diff --git a/revision_store.py b/revision_store.py
index 4ec4ba3..73943ca 100644
--- a/revision_store.py
+++ b/revision_store.py
@@ -271,7 +271,7 @@ class AbstractRevisionStore(object):
parent_candidate_entries.keys())
heads = []
for inv in self._rev_parent_invs:
- if ie.file_id in inv:
+ if inv.has_id(ie.file_id):
old_rev = inv[ie.file_id].revision
if old_rev in head_set:
rev_id = inv[ie.file_id].revision