diff options
author | Ian Clatworthy <ian.clatworthy@canonical.com> | 2009-03-08 23:05:50 +1000 |
---|---|---|
committer | Ian Clatworthy <ian.clatworthy@canonical.com> | 2009-03-08 23:05:50 +1000 |
commit | 3199350ee500ad1dd39b2b3802a44716ff95d14e (patch) | |
tree | 04c90aa8dbd303fbc0f1967581aa3e035922ce71 | |
parent | 59ac6b0471ec2deff49a1c4ee26cf8854cd2be7c (diff) | |
download | bzr-fastimport-3199350ee500ad1dd39b2b3802a44716ff95d14e.tar.gz |
handle delete of unknown file in chk formats & reduce noise
-rw-r--r-- | bzr_commit_handler.py | 7 | ||||
-rw-r--r-- | processor.py | 5 |
2 files changed, 10 insertions, 2 deletions
diff --git a/bzr_commit_handler.py b/bzr_commit_handler.py index 572afb2..bed04e2 100644 --- a/bzr_commit_handler.py +++ b/bzr_commit_handler.py @@ -88,7 +88,7 @@ class GenericCommitHandler(processor.CommitHandler): inv = self.cache_mgr.inventories[revision_id] except KeyError: if self.verbose: - self.note("get_inventory cache miss for %s", revision_id) + self.mutter("get_inventory cache miss for %s", revision_id) # Not cached so reconstruct from the RevisionStore inv = self.rev_store.get_inventory(revision_id) self.cache_mgr.inventories[revision_id] = inv @@ -261,10 +261,13 @@ class GenericCommitHandler(processor.CommitHandler): def _delete_item(self, path, inv): file_id = inv.path2id(path) + if file_id is None: + self.mutter("ignoring delete of %s as not in inventory", path) + return try: ie = inv[file_id] except errors.NoSuchId: - self.warning("ignoring delete of %s as not in inventory", path) + self.mutter("ignoring delete of %s as not in inventory", path) else: self.record_delete(path, ie) diff --git a/processor.py b/processor.py index baf8668..f483892 100644 --- a/processor.py +++ b/processor.py @@ -210,6 +210,11 @@ class CommitHandler(object): msg = "WARNING: %s (%s)" % (msg, self.command.id) warning(msg, *args) + def mutter(self, msg, *args): + """Output a mutter but add context.""" + msg = "%s (%s)" % (msg, self.command.id) + mutter(msg, *args) + def debug(self, msg, *args): """Output a mutter if the appropriate -D option was given.""" if "fast-import" in debug.debug_flags: |