summaryrefslogtreecommitdiff
path: root/obnamlib/plugins/fuse_plugin.py
AgeCommit message (Collapse)AuthorFilesLines
2017-06-25Fix: copyright yearLars Wirzenius1-1/+1
2017-06-24Fix: avoid bare "except:" statementsLars Wirzenius1-6/+6
2016-07-14Fix typo in fuse_plugin, calling the wrong repo methodMichel Alexandre Salim1-1/+1
The repo interface exposes the `get_client_generation_ids` method, but in one location in `fuse_plugin` it is called as `get_clientgeneration_ids`. As reported in Fedora bugzilla, https://bugzilla.redhat.com/show_bug.cgi?id=1340138 #1340138 [abrt] obnam: fuse_plugin.py:391:statfs:AttributeError: 'RepositoryFormat6' object has no attribute 'get_clientgeneration_ids'
2016-01-15Update copyright yearsLars Wirzenius1-1/+1
2016-01-15Reorder importsLars Wirzenius1-4/+4
2015-08-29Drop dead codeLars Wirzenius1-2/+0
2015-08-29Drop unnecessary no-op statement (pass)Lars Wirzenius1-1/+0
2015-08-29Let logging function do string formattingLars Wirzenius1-1/+1
2015-08-29Make class be new-styleLars Wirzenius1-1/+1
2015-08-29Avoid self-modifying code in FUSE pluginLars Wirzenius1-5/+16
The old code was correct, but confused pylint. The new code is clearer for everyone, I think, and should be equivalent.
2015-08-28Fix variable referenceLars Wirzenius1-1/+1
2015-08-19Add get_metadata_from_file_keys and use itLars Wirzenius1-31/+2
2015-07-04Cleanups suggested by pep8Lars Wirzenius1-20/+21
2015-04-03Update copyright yearsLars Wirzenius1-1/+1
2015-03-22fix typosThomas Waldmann1-1/+1
2015-03-22fuse_plugin: fix undefined "blocks"Thomas Waldmann1-1/+1
2015-03-22add missing imports, remove unused importsThomas Waldmann1-1/+0
2014-04-13Add missing copyright statements, yearsLars Wirzenius1-1/+1
2014-03-30Apply patch from Valery to fix FUSE readLars Wirzenius1-6/+5
Patch by Valery Yundin. He gave the following recipe to verify it works: * set "ObnamFuseFile.keep_cache" to False * backup * mount * diff -r the original and via FUSE Before the patch this failed for me if the original file was large enough, on the order of two to a hundred megs. It works after the patch. Someday I will have to really write a test suite for this.
2014-03-22Fix advancing in FUSE fileobnam-1.7.1Lars Wirzenius1-1/+1
We don't necessarily have the content, but we do know its size.
2014-03-18Bug fix: change FUSE read to read right amount of dataLars Wirzenius1-5/+6
The actual bug was that when we extracted data from the chunk we were processing at the time, we used "data[start:n]", where n is the number of bytes we wanted to extract from this chunk. This is clearly wrong: the slice end is an offset, not a length to be added to the start. Thus, "data[start:start+n]" is the fix. In addition, a small performance silliness is removed by fixing the check for whether we should be extracting data from a chunk: if the chunk ends at the start of the offset in the file from where data should be returned, it should clearly not be considered. Clarify code a bit as well, which was useful for me to understand what's going on.
2014-03-03Log warning in FUSE if ignoring errorLars Wirzenius1-1/+2
2014-02-27Get rid of obnamlib.ErrorLars Wirzenius1-18/+24
2014-02-25Cache chunk sizes for readLars Wirzenius1-2/+19
2014-02-25RE-instate chdir in re-opening repoLars Wirzenius1-0/+12
Valery pointed out to me that FUSE itself does a chdir, so we do need to chdir back to where we were when re-opening.
2014-02-23Convert fuse_plugin.py to RepositoryInterfaceLars Wirzenius1-57/+120
2014-02-23Rename variable for clarityLars Wirzenius1-5/+5
2014-02-23Remove .cwd attribute and chdirLars Wirzenius1-5/+0
There seems to be no need to chdir back to the original cwd. Nothing in the plugin causes chdir to happen.
2014-02-23Rename ObnamFile.fs to .fuse_fsLars Wirzenius1-9/+9
This way it's clearer that we refer to ObnamFuse, not an instance of obnamlib.VFS.
2014-02-23Move multiple_root_list into init_root, rename variablesLars Wirzenius1-36/+39
2014-02-23Rename methods for clarityLars Wirzenius1-9/+9
2014-02-23Replace duplicate code with call to init_rootLars Wirzenius1-10/+2
2014-02-23Remove unnecessary helper variableLars Wirzenius1-4/+2
2014-02-23Move init_root next to __init__, for clarityLars Wirzenius1-10/+10
2014-02-23Remove now-useless sizecache attributeLars Wirzenius1-1/+0
2014-02-23Remove metadata cacheLars Wirzenius1-16/+9
RepositoryInterface implementations are meant to do the caching internally, for when it's useful, rather than have it in every caller.
2014-02-23Move get_gen_path to a class methodLars Wirzenius1-9/+8
2014-02-23Move __init__ to top of classLars Wirzenius1-11/+11
2014-02-23Simplify codeLars Wirzenius1-4/+4
It's clearer to use "if foo in bar" rather than catching KeyError.
2014-02-23Get rid of another helper variableLars Wirzenius1-2/+1
2014-02-23Get rid of another helper variableLars Wirzenius1-3/+2
2014-02-23Get rid of helper variableLars Wirzenius1-5/+3
It is no longer used enough to warrant its existence.
2014-02-23Rewrite read() to fix it, simplify and pessimise itLars Wirzenius1-63/+32
The previous code was broken: it assumed that most chunks (all but the last one in a file) were of the same size, and that's not a valid assumption. It is almost always true, but the user may change the chunk size setting for any backup run, and then the assumption is no longer true. The new code is much simpler. It is also, however, much slower, since it has to read through everything. We can optimise this, later, but caching the chunk sizes, and even later by making it possible to find the length of a chunk without downloading it from the repository.
2014-02-23Break huge if/elseLars Wirzenius1-49/+49
The then-branch ends in a return, so the else branch doesn't need to be part of the if/else, and can just be de-indented, for a little extra clarity.
2014-02-23Remove unnecessary try/exceptLars Wirzenius1-69/+62
It was only used for logging, and that's handled top-level just fine. Having it here only obfuscates the code.
2014-02-23Move test outside try/except blockLars Wirzenius1-2/+3
There's no point in having it in the block.
2014-02-23Get rid of "mount root" conceptLars Wirzenius1-32/+13
This is simpler, and also simplfies the code.
2014-02-23Remove now-unnecessary if (from viewmode deletion)Lars Wirzenius1-26/+25
2014-02-23Format docstring according to PEP8Lars Wirzenius1-2/+1
2014-02-23Remove unused single_root_list methodLars Wirzenius1-10/+0