diff options
author | Lars Wirzenius <liw@liw.fi> | 2012-11-18 20:20:24 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2012-11-18 20:20:24 +0000 |
commit | f4ba1903a3126b6e224ed7c11a07d9bb18ac07b8 (patch) | |
tree | 88cafa9843f8f2da761a0bfe6e2f246f6493a1a6 | |
parent | b61f4fcba38225557066f42f9246cb0db6a18f40 (diff) | |
download | obnam-f4ba1903a3126b6e224ed7c11a07d9bb18ac07b8.tar.gz |
Add --fsck-last-generation-only option
-rw-r--r-- | obnamlib/plugins/fsck_plugin.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/obnamlib/plugins/fsck_plugin.py b/obnamlib/plugins/fsck_plugin.py index 524b96d3..56979644 100644 --- a/obnamlib/plugins/fsck_plugin.py +++ b/obnamlib/plugins/fsck_plugin.py @@ -197,6 +197,8 @@ class CheckClient(WorkItem): self.repo.open_client(self.client_name) genids = self.repo.list_generations() yield CheckGenerationIdsAreDifferent(self.client_name, genids) + if self.settings['fsck-last-generation-only'] and genids: + genids = genids[-1:] for genid in genids: yield CheckGeneration(self.client_name, genid) @@ -283,6 +285,9 @@ class FsckPlugin(obnamlib.ObnamPlugin): ['fsck-ignore-client'], 'do not check repository data for cient NAME', metavar='NAME') + self.app.settings.boolean( + ['fsck-last-generation-only'], + 'check only the last generation for each client') def configure_ttystatus(self): self.app.ts.clear() |