summaryrefslogtreecommitdiff
path: root/bzr_commit_handler.py
diff options
context:
space:
mode:
authorIan Clatworthy <ian.clatworthy@canonical.com>2009-03-16 12:15:12 +1000
committerIan Clatworthy <ian.clatworthy@canonical.com>2009-03-16 12:15:12 +1000
commita1c67e37afa8f3c1eb2a159e4fdb0b11ed3f1057 (patch)
tree6c09c55aedac9e9fbecc4559f5e16a18f9c4adc5 /bzr_commit_handler.py
parentb661d0c646d3f3f35bc6f669d3f24239c5eeb11c (diff)
downloadbzr-fastimport-a1c67e37afa8f3c1eb2a159e4fdb0b11ed3f1057.tar.gz
make per-file parents tuples and fix text loading in chk formats
Diffstat (limited to 'bzr_commit_handler.py')
-rw-r--r--bzr_commit_handler.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/bzr_commit_handler.py b/bzr_commit_handler.py
index f33470c..3501873 100644
--- a/bzr_commit_handler.py
+++ b/bzr_commit_handler.py
@@ -76,7 +76,7 @@ class GenericCommitHandler(processor.CommitHandler):
# cache of per-file parents for this commit, indexed by file-id
self.per_file_parents_for_commit = {}
if self.rev_store.expects_rich_root():
- self.per_file_parents_for_commit[inventory.ROOT_ID] = []
+ self.per_file_parents_for_commit[inventory.ROOT_ID] = ()
# Keep the basis inventory. This needs to be treated as read-only.
if len(self.parents) == 0:
@@ -382,7 +382,7 @@ class InventoryCommitHandler(GenericCommitHandler):
def record_new(self, path, ie):
try:
- self.per_file_parents_for_commit[ie.file_id] = []
+ self.per_file_parents_for_commit[ie.file_id] = ()
self.inventory.add(ie)
except errors.DuplicateFileId:
# Directory already exists as a file or symlink
@@ -405,7 +405,7 @@ class InventoryCommitHandler(GenericCommitHandler):
def record_rename(self, old_path, new_path, file_id, ie):
new_basename, new_parent_id = self._ensure_directory(new_path,
self.inventory)
- self.per_file_parents_for_commit[file_id] = []
+ self.per_file_parents_for_commit[file_id] = ()
self.inventory.rename(file_id, new_parent_id, new_basename)
def _delete_item(self, path, inv):
@@ -545,13 +545,13 @@ class CHKInventoryCommitHandler(GenericCommitHandler):
# Calculate the per-file parents
if old_path is None:
# add
- self.per_file_parents_for_commit[file_id] = []
+ self.per_file_parents_for_commit[file_id] = ()
elif new_path is None:
# delete
pass
elif old_path != new_path:
# rename
- self.per_file_parents_for_commit[file_id] = []
+ self.per_file_parents_for_commit[file_id] = ()
else:
# modify
per_file_parents, ie.revision = \