diff options
author | Lars Wirzenius <liw@liw.fi> | 2015-07-19 12:42:48 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2015-07-19 13:00:23 +0300 |
commit | fe42dd953139ffc3bf25ed0a0beea9acbaf5dce6 (patch) | |
tree | df7d22c7e454a0850af6b2d9cafe267644af6c7a /obnamlib/fmt_ga/chunk_store.py | |
parent | 3915676a4d961247cf9d22d98af6a31ebe1f6fd7 (diff) | |
download | obnam-fe42dd953139ffc3bf25ed0a0beea9acbaf5dce6.tar.gz |
Drop remove_chunk
FORMAT GREEN ALBATROSS puts multiple chunks in a bag. This means that
removing an individual chunk can't happen without rewriting a bag, and
that would be disastrous for other reasons. Thus, we drop the
remove_chunk method from RepositoryInterface.
Format 6 still drops chunks when "obnam forget" is run.
For Green Albatross, we'll need to figure out some kind of garbage
collection for "obnam forget" (or
RepositoryInterface.remove_generation) to use, so that unused chunk
bags actually disappear. But they weren't disappearing correctly
before this change anyway.
Diffstat (limited to 'obnamlib/fmt_ga/chunk_store.py')
-rw-r--r-- | obnamlib/fmt_ga/chunk_store.py | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/obnamlib/fmt_ga/chunk_store.py b/obnamlib/fmt_ga/chunk_store.py index 2476ad5d..f506f6e7 100644 --- a/obnamlib/fmt_ga/chunk_store.py +++ b/obnamlib/fmt_ga/chunk_store.py @@ -78,20 +78,6 @@ class GAChunkStore(object): bag_id, _ = obnamlib.parse_object_id(chunk_id) return self._bag_store.has_bag(bag_id) - def remove_chunk(self, chunk_id): - bag_id, _ = obnamlib.parse_object_id(chunk_id) - if self._bag is not None and bag_id == self._bag.get_id(): - self._bag = None - else: - try: - self._bag_store.remove_bag(bag_id) - except (IOError, OSError) as e: - if e.errno == errno.ENOENT: - raise obnamlib.RepositoryChunkDoesNotExist( - chunk_id=chunk_id, - filename=None) - raise - def get_chunk_ids(self): result = [] if self._bag: |