diff options
author | Lars Wirzenius <liw@liw.fi> | 2015-05-17 15:22:39 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2015-05-17 15:22:39 +0300 |
commit | d7e8d48fba03f17dcef130fa988c0c3f2d27bbeb (patch) | |
tree | a78752b929da3de564f3c0aff2f82186abacb82e | |
parent | fd8aba925e339d53757898f3c66bfcec723c1a36 (diff) | |
download | obnam-d7e8d48fba03f17dcef130fa988c0c3f2d27bbeb.tar.gz |
Set max size for bags, allowing more than one chunk/bag
-rw-r--r-- | obnamlib/app.py | 1 | ||||
-rw-r--r-- | obnamlib/fmt_6/repo_fmt_6.py | 3 | ||||
-rw-r--r-- | obnamlib/fmt_ga/format.py | 7 |
3 files changed, 9 insertions, 2 deletions
diff --git a/obnamlib/app.py b/obnamlib/app.py index 170a1fa7..83bdf54a 100644 --- a/obnamlib/app.py +++ b/obnamlib/app.py @@ -252,6 +252,7 @@ class App(cliapp.Application): 'idpath_skip': self.settings['idpath-skip'], 'hooks': self.hooks, 'current_time': self.time, + 'chunk_size': self.settings['chunk-size'], } if create: diff --git a/obnamlib/fmt_6/repo_fmt_6.py b/obnamlib/fmt_6/repo_fmt_6.py index 1c179773..52327ca5 100644 --- a/obnamlib/fmt_6/repo_fmt_6.py +++ b/obnamlib/fmt_6/repo_fmt_6.py @@ -56,7 +56,8 @@ class RepositoryFormat6(obnamlib.RepositoryInterface): idpath_bits=obnamlib.IDPATH_BITS, idpath_skip=obnamlib.IDPATH_SKIP, hooks=None, - current_time=None): + current_time=None, + **kwargs): self._real_fs = None self._lock_timeout = lock_timeout diff --git a/obnamlib/fmt_ga/format.py b/obnamlib/fmt_ga/format.py index 5d3e25e1..8f63e30a 100644 --- a/obnamlib/fmt_ga/format.py +++ b/obnamlib/fmt_ga/format.py @@ -25,11 +25,16 @@ class RepositoryFormatGA(obnamlib.RepositoryDelegator): def __init__(self, **kwargs): obnamlib.RepositoryDelegator.__init__(self, **kwargs) + self.set_client_list_object(obnamlib.GAClientList()) - self.set_chunk_store_object(obnamlib.GAChunkStore()) self.set_chunk_indexes_object(obnamlib.GAChunkIndexes()) self.set_client_factory(obnamlib.GAClient) + chunk_store = obnamlib.GAChunkStore() + if 'chunk_size' in kwargs: # pragma: no cover + chunk_store.set_max_chunk_size(kwargs['chunk_size']) + self.set_chunk_store_object(chunk_store) + def init_repo(self): pass |