diff options
author | Ian Clatworthy <ian.clatworthy@canonical.com> | 2009-03-08 17:43:15 +1000 |
---|---|---|
committer | Ian Clatworthy <ian.clatworthy@canonical.com> | 2009-03-08 17:43:15 +1000 |
commit | bf71ea3dd380bba08a387d703f875d737fc56c48 (patch) | |
tree | 8e9370fda15bd2445fb89073a6f44a5eb58b6e1e /bzr_commit_handler.py | |
parent | 3ec517966d756ca793cb98d04d552afcec561ddb (diff) | |
download | bzr-fastimport-bf71ea3dd380bba08a387d703f875d737fc56c48.tar.gz |
fix first file is in a subdirectory bug for chk formats
Diffstat (limited to 'bzr_commit_handler.py')
-rw-r--r-- | bzr_commit_handler.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bzr_commit_handler.py b/bzr_commit_handler.py index 1207a29..572afb2 100644 --- a/bzr_commit_handler.py +++ b/bzr_commit_handler.py @@ -244,7 +244,11 @@ class GenericCommitHandler(processor.CommitHandler): """ result = self.directory_entries.get(dirname) if result is None: - file_id = inv.path2id(dirname) + try: + file_id = inv.path2id(dirname) + except errors.NoSuchId: + # In a CHKInventory, this is raised if there's no root yet + raise KeyError if file_id is None: raise KeyError result = inv[file_id] |