summaryrefslogtreecommitdiff
path: root/obnamlib/repo_interface.py
AgeCommit message (Collapse)AuthorFilesLines
2016-07-13Fix typos, from Andrea GelminiLars Wirzenius1-1/+1
2016-07-02Drop r/o caches while forgetting to reduce memory useLars Wirzenius1-0/+10
2016-07-02Add note about client lock needed for flush_cacheLars Wirzenius1-0/+2
2016-06-25Add flush_client method and fix RepositoryClientNotLocked instanceLars Wirzenius1-0/+8
This may be used to force any in-memory caches for an open client in a repository to be written out, and then dropped, to reduct memory use. Only green-albatross implements this, for now.
2016-03-17Actually store SHA checksums in GALars Wirzenius1-1/+5
2016-03-17Add RepositoryInterface.get_client_checksum_keyLars Wirzenius1-1/+15
2016-03-17Add whole file checksummer classLars Wirzenius1-0/+4
This also adds MD5 to the checksummer.py file so we don't need to special case it.
2016-03-11Remove file keys that are not in the metadataLars Wirzenius1-0/+5
2016-03-11Do not alias test key with symlink target keyLars Wirzenius1-6/+12
This caused other parts of Obnam to break when backing up symlinks.
2016-01-15Update copyright yearsLars Wirzenius1-1/+1
2016-01-15Comment out dead test codeLars Wirzenius1-25/+25
It would be handy to resurrect this, but as the comment says, they don't work, and I haven't time to fix that now. However, the fixed test causes a pylint warning.
2015-12-21Change remove_generation to return list of chunksLars Wirzenius1-2/+7
This will be useful for actually implementing removal of unused chunks in green-albatross.
2015-12-06Make REPO_* constant numbers less manualLars Wirzenius1-25/+35
2015-12-06Do not require while-file MD5 for all formatsLars Wirzenius1-1/+0
2015-11-20Change find_chunk_ids_by_content to look up by tokenLars Wirzenius1-7/+9
Also rename the method
2015-09-28Fix un-idiomatic type checks (thanks, pylint)Lars Wirzenius1-1/+3
2015-09-28Avoid using assertTrue(True) in unit testLars Wirzenius1-2/+1
2015-08-29Merge Lukas's changes to unlock if gpg failsLars Wirzenius1-0/+8
Conflicts: obnamlib/__init__.py
2015-08-29Fix name of interface method to remove_unused_chunksLars Wirzenius1-1/+1
2015-08-29Style fixes suggested by pylintLars Wirzenius1-4/+4
2015-08-28Fix REPO_FILE_MTIME to be REPO_FILE_MTIME_SECLars Wirzenius1-3/+3
2015-08-28Add RepositoryInterfaceTests.repo attributeLars Wirzenius1-0/+2
2015-08-28Change how REPO_ constants are setLars Wirzenius1-39/+40
This makes the code understandable by pylint, and allows it to be less confused, revealing real errors in the output.
2015-08-19Add get_metadata_from_file_keys and use itLars Wirzenius1-21/+44
2015-08-19Add set_file_keys_from_metadata to interfaceLars Wirzenius1-0/+35
2015-08-05Unlock repository after GPG errorLukáš Poláček1-0/+8
2015-08-01Redefine commit_* to NOT unlockLars Wirzenius1-22/+93
Update all callers to call unlock_foo after every commit_foo. Add tests to check that commit_* do not unlock. Fix some tests that were meaningless. Change commit_* implementations to not unlock. This allows us to commit, then continue, e.g., for forget or backup checkpoints. The checkpoints still unlock and re-lock, however, due to tests failing otherwise, indicating a problem elswewhere.
2015-08-01Add remove_unused_chunks methodLars Wirzenius1-0/+9
2015-08-01Clarify that flush_chunks is for new chunksLars Wirzenius1-1/+1
2015-07-25Drop --ignore-missing-chunks optionLars Wirzenius1-4/+1
We want robustness by default, and always.
2015-07-25Add --ignore-missing-chunks option to forgetLukáš Poláček1-1/+4
2015-07-19Drop remove_chunkLars Wirzenius1-30/+0
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.
2015-07-17Speed up repo_key_name with lookup tableLars Wirzenius1-4/+3
2015-07-17Simplify get_file_children in Green AlbatrossLars Wirzenius1-0/+15
2015-07-10Buffer added files until st_mode is knownLars Wirzenius1-0/+16
Green Albatross needs to know if it the added file is a directory, before it can add it.
2015-07-04Cleanups suggested by pep8Lars Wirzenius1-3/+4
2015-05-19Add lock_everything and unlock_everythingLars Wirzenius1-1/+64
2015-05-16Add RepositoryInterface.flush_chunks methodLars Wirzenius1-0/+10
2015-03-22fix typosThomas Waldmann1-9/+9
2015-03-22fix typo in interface base classThomas Waldmann1-1/+1
2015-03-22Remove unused argument from get_fsck_work_itemsLars Wirzenius1-4/+1
No implementation of RepositoryInterface actually wants the settings argument, and no user of the interface gives the argument. Thanks to Thomas Waldmann for noticing this.
2015-01-30Add filename to missing chunk error messageLars Wirzenius1-1/+4
2015-01-24Fix copyright years, add missing gpl3 blurbLars Wirzenius1-1/+1
2015-01-24Add get_shared_directories interface callLars Wirzenius1-0/+13
2015-01-18Return integer timestamps for generationsLars Wirzenius1-5/+7
2014-06-05Shorten long linesLars Wirzenius1-1/+1
2014-06-04fsck: optionally remove unused chunksCarlo Teubner1-0/+33
Remove unused chunks if either --fsck-fix or --fsck-rm-unused is given. The second option is introduced because --fsck-fix may cause fsck to fail in the case where we're out of disk space.
2014-06-04Fix typo in method nameCarlo Teubner1-1/+1
2014-06-04Fix typo in docstringCarlo Teubner1-1/+1
2014-04-13Format long linesLars Wirzenius1-2/+4