lp:~bmerry/duplicity/pydrive-id-cache
- Get this branch:
- bzr branch lp:~bmerry/duplicity/pydrive-id-cache
Branch merges
- duplicity-team: Pending requested
-
Diff: 152 lines (+85/-23)1 file modifiedduplicity/backends/pydrivebackend.py (+85/-23)
Branch information
Recent revisions
- 1101. By Bruce Merry <email address hidden>
-
Add an ID cache to the PyDrive backend.
This is an in-memory cache mapping filenames to object IDs. This potentially
speeds up searching for a filename (although there is some cost to validate the
cache on each use). It also ensures that running _query immediately after _put
will find the file, even if the server doesn't have list-after-write
consistency (Google Cloud Storage doesn't, but I can't find any info on Drive).There are also a number of other improvements:
- Putting a file with a filename that already exists will replace the file
in-place, instead of creating a new file with identical filename (which
Google Drive allows).
- id_by_name now does a targeted search for just the filename, instead of
iterating over a complete directory listing.
- Added _error_code to map 404 errors to backend_not_found
- Files in the trash are excluded from listings
- Print a warning when trying to delete a file that doesn't exist.This should fix cases where duplicate filenames are created, but it doesn't yet
deal explicitly with cases where they already exist (it's untested).There is also a race condition where if a file is externally deleted during
_delete, it will raise an exception (which is mapped to backend_not_found).
That is probably acceptable behaviour, but the behaviour really ought to be
consistent. - 1100. By Kenneth Loafman
-
* Fixed bug 791794 - description of --gpg-options is misleading, Simply
needed to add the '--' before the options as in "--opt1 --opt2=parm". - 1098. By Kenneth Loafman
-
* Merged in lp:~raymii/duplicity/fix-swiftbackend-max-10000-files-in-list
- Swiftclient by default returns at max 10000 files. By adding
full_listing= True we make sure all objects are returned.
Ref: https://lists. nongnu. org/archive/ html/duplicity- talk/2015- 05/msg00060. html
and http://docs.openstack. org/developer/ python- swiftclient/ swiftclient. html#swiftclien t.client. get_container - 1097. By Kenneth Loafman
-
* Merged in lp:~ed.so/duplicity/gdocs.pydrive
- make pydrive new gdocs default backend
- keep gdata backend as gdata+gdocs:// - 1096. By Kenneth Loafman
-
* Merged in lp:~bmerry/duplicity/pydrive-regular
- This implements the proposal made by somebody else
(http://lists.gnu. org/archive/ html/duplicity- talk/2015- 02/msg00037. html)
to allow the pydrive backend to work with a normal drive account instead
of a service account. It seems to be working for me: I was able to migrate
seamlessly from the gdocs backend. It's set up so that a service account
can still be used, depending on which environment variable is set.
The man page is updated to describe how to use the new functionality.
Branch metadata
- Branch format:
- Branch format 7
- Repository format:
- Bazaar repository format 2a (needs bzr 1.16 or later)
- Stacked on:
- lp:~duplicity-team/duplicity/0.7-series