Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/repo.py
Commit message (Collapse)AuthorAgeFilesLines
* Improve performance of metadata readingHEADmasterArthur de Jong2015-07-031-42/+22
| | | | | | | | | This inlines the clean_meta() function and reads the whole JSON file in memory to greatly reduce the number of function calls that are performed reading the files list. This is especially noticable in reading the backup files lists. This does mean that more memory is used when reading large files.
* Change metadata informationArthur de Jong2015-06-251-1/+52
| | | | | | | | | | This changes the information in the metadata dict to include the file type in a separate field and limit the mode information to standard permissions only. Upon reading files lists from the repository the old format is automatically converted. This changes local cache file to ensure all information is re-read (the previous commit also already required this).
* Split out backend functions from repoArthur de Jong2015-06-201-54/+34
| | | | | | This creates a FileBackend class (from parts of the FileRepository class that is now renamed to Repository) that implements a simple API that can also be provided by other backends.
* Add an fsck commandArthur de Jong2015-05-171-0/+3
| | | | | | | | This command checks the repository to see if any files are missing or corrupt and whether backups can still be restored. This currently only reads meta-data files and only checks archive files presence.
* Make filters context managersArthur de Jong2015-05-151-17/+13
| | | | | This ensures that open files and streams are properly closed when an exception occurs.
* Use GnuPGKeyEncryption for reading passphraseArthur de Jong2015-05-141-1/+1
| | | The keyencryption property was removed. This fixes d676905.
* Catch certain problems reading JSON filesArthur de Jong2015-05-071-2/+2
| | | | | This also replaces catches IOError by catching EnvironmentError which covers a wider range of errors.
* Check archive existance when resyncingArthur de Jong2015-05-071-6/+2
| | | | | The checks that the repository contains an archive file when resyncing the metdata cache from the repository.
* Check that we can read the just written passphraseArthur de Jong2015-05-071-0/+4
| | | | | This tries to read the newly written passphrase file before installing it as a new file to avoid installing a not-decryptable passphrase file.
* Refactor out repository and cacheArthur de Jong2015-04-101-0/+251
This moves functionality related to the metadata cache and repository files to separate modules.