On some disk repository, errors occur when trying to retrieve some unexisting object.
Steps to reproduce on a local storage with latest swh-loader-git
Use /srv/storage/space/mirrors/gitorious.org/mnt/repositories/hylafax/hylafax.git:
```
repo = 'hylafax.git'
origin_url = 'http://foo/bar/git'
import logging
logging.basicConfig(level=logging.DEBUG)
from swh.loader.git.tasks import LoadDiskGitRepository
t = LoadDiskGitRepository()
t.run(origin_url=origin_url, directory=repo, date='2016-05-03T15:16:32+00:00')
```
output:
```
DEBUG:swh.scheduler.task.LoadDiskGitRepository:Creating git origin for http://hylafax.git
DEBUG:swh.scheduler.task.LoadDiskGitRepository:Done creating git origin for http://hylafax.git
DEBUG:amqp:Start from server, version: 0.9, properties: {'capabilities': {'direct_reply_to': True, 'per_consumer_qos': True, 'basic.nack': True, 'exchange_exchange_bindings': True, 'authentication_failure_close': True, 'consumer_priorities': True, 'consumer_cancel_notify': True, 'connection.blocked': True, 'publisher_confirms': True}, 'platform': 'Erlang/OTP', 'product': 'RabbitMQ', 'cluster_name': 'rabbit@corellia.lan', 'information': 'Licensed under the MPL. See http://www.rabbitmq.com/', 'copyright': 'Copyright (C) 2007-2016 Pivotal Software, Inc.', 'version': '3.6.6'}, mechanisms: ['AMQPLAIN', 'PLAIN'], locales: ['en_US']
DEBUG:amqp:Open OK!
DEBUG:amqp:using channel_id: 1
DEBUG:amqp:Channel open
Traceback (most recent call last):
File "./load-git-disk.py", line 26, in <module>
main()
File "/usr/lib/python3/dist-packages/click/core.py", line 716, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/python3/dist-packages/click/core.py", line 696, in main
rv = self.invoke(ctx)
File "/usr/lib/python3/dist-packages/click/core.py", line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python3/dist-packages/click/core.py", line 534, in invoke
return callback(*args, **kwargs)
File "./load-git-disk.py", line 22, in main
date='2016-05-03T15:16:32+00:00')
File "/home/tony/work/inria/repo/swh/swh-environment/swh-scheduler/swh/scheduler/task.py", line 35, in run
raise e from None
File "/home/tony/work/inria/repo/swh/swh-environment/swh-scheduler/swh/scheduler/task.py", line 32, in run
result = self.run_task(*args, **kwargs)
File "/home/tony/work/inria/repo/swh/swh-environment/swh-loader-git/swh/loader/git/tasks.py", line 39, in run_task
return loader.load(origin_url, directory, dateutil.parser.parse(date))
File "/home/tony/work/inria/repo/swh/swh-environment/swh-loader-git/swh/loader/git/base.py", line 422, in load
self.fetch_data()
File "/home/tony/work/inria/repo/swh/swh-environment/swh-loader-git/swh/loader/git/loader.py", line 48, in fetch_data
type_name = self.repo[oid].type_name
File "/usr/lib/python3/dist-packages/dulwich/repo.py", line 470, in __getitem__
return self.object_store[name]
File "/usr/lib/python3/dist-packages/dulwich/object_store.py", line 119, in __getitem__
return ShaFile.from_raw_string(type_num, uncomp, sha=sha)
File "/usr/lib/python3/dist-packages/dulwich/objects.py", line 391, in from_raw_string
obj.set_raw_string(string, sha)
File "/usr/lib/python3/dist-packages/dulwich/objects.py", line 303, in set_raw_string
self.set_raw_chunks([text], sha)
File "/usr/lib/python3/dist-packages/dulwich/objects.py", line 308, in set_raw_chunks
self._deserialize(chunks)
File "/usr/lib/python3/dist-packages/dulwich/objects.py", line 747, in _deserialize
raise ObjectFormatException("Unknown field %s" % field)
dulwich.errors.ObjectFormatException: Unknown field b'Thu'
```