Merge lp:~bllfr0g/duplicity/duplicity into lp:~duplicity-team/duplicity/0.8-series

Proposed by Adam Jacobs
Status: Merged
Merged at revision: 1476
Proposed branch: lp:~bllfr0g/duplicity/duplicity
Merge into: lp:~duplicity-team/duplicity/0.8-series
Diff against target: 62 lines (+18/-5)
3 files modified
CHANGELOG (+5/-0)
Changelog.GNU (+8/-0)
duplicity/backends/b2backend.py (+5/-5)
To merge this branch: bzr merge lp:~bllfr0g/duplicity/duplicity
Reviewer Review Type Date Requested Status
Kenneth Loafman Pending
Review via email: mp+374070@code.launchpad.net

This proposal supersedes a proposal from 2019-10-13.

Commit message

fixes bug #1847885
fixes b2 backend so it is backwards compatible with v0 of b2sdk AND forward compatible with v1

Description of the change

re-submitting with additional fix for b2sdk v1, and changelog updates

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'CHANGELOG'
--- CHANGELOG 2019-10-08 19:19:37 +0000
+++ CHANGELOG 2019-10-14 03:45:51 +0000
@@ -6,6 +6,11 @@
6 that duplicity's ssh_paramiko_backend.py was not handling6 that duplicity's ssh_paramiko_backend.py was not handling
7 warning suppression and ended up clearing all warnings,7 warning suppression and ended up clearing all warnings,
8 including those that default to off.8 including those that default to off.
9* Updated b2 backend to work with both v0 and v1 of b2sdk
10* Fixed bug #1847885 - B2 fails on string concatenation.
11 - use util.fsdecode() to get a string not bytes.
12 - Partially fixed in bug #1843995, this applies same fix to
13 remaining instances of the problem
914
1015
11New in v0.8.05 (2019/10/06)16New in v0.8.05 (2019/10/06)
1217
=== modified file 'Changelog.GNU'
--- Changelog.GNU 2019-10-08 19:19:37 +0000
+++ Changelog.GNU 2019-10-14 03:45:51 +0000
@@ -1,3 +1,11 @@
12019-10-12 Adam Jacobs <alj@boxyfrog.com>
2
3 * Updated b2 backend to work with both v0 and v1 of b2sdk
4 * Fixed bug #1847885 - B2 fails on string concatenation.
5 - use util.fsdecode() to get a string not bytes.
6 - Partially fixed in bug #1843995, this applies same fix to
7 remaining instances of the problem
8
12019-10-08 Kenneth Loafman <kenneth@loafman.com>92019-10-08 Kenneth Loafman <kenneth@loafman.com>
210
3 * Fixed Resouce warnings when using paramiko. It turns out11 * Fixed Resouce warnings when using paramiko. It turns out
412
=== modified file 'duplicity/backends/b2backend.py'
--- duplicity/backends/b2backend.py 2019-10-05 15:55:30 +0000
+++ duplicity/backends/b2backend.py 2019-10-14 03:45:51 +0000
@@ -135,21 +135,21 @@
135 u"""135 u"""
136 Delete filename from remote server136 Delete filename from remote server
137 """137 """
138 log.Log(u"Delete: %s" % self.path + filename, log.INFO)138 log.Log(u"Delete: %s" % self.path + util.fsdecode(filename), log.INFO)
139 file_version_info = self.file_info(quote_plus(self.path + filename))139 file_version_info = self.file_info(quote_plus(self.path + util.fsdecode(filename)))
140 self.bucket.delete_file_version(file_version_info.id_, file_version_info.file_name)140 self.bucket.delete_file_version(file_version_info.id_, file_version_info.file_name)
141141
142 def _query(self, filename):142 def _query(self, filename):
143 u"""143 u"""
144 Get size info of filename144 Get size info of filename
145 """145 """
146 log.Log(u"Query: %s" % self.path + filename, log.INFO)146 log.Log(u"Query: %s" % self.path + util.fsdecode(filename), log.INFO)
147 file_version_info = self.file_info(quote_plus(self.path + filename))147 file_version_info = self.file_info(quote_plus(self.path + util.fsdecode(filename)))
148 return {u'size': file_version_info.size148 return {u'size': file_version_info.size
149 if file_version_info is not None and file_version_info.size is not None else -1}149 if file_version_info is not None and file_version_info.size is not None else -1}
150150
151 def file_info(self, filename):151 def file_info(self, filename):
152 response = self.bucket.list_file_names(filename, 1)152 response = self.bucket.api.session.list_file_names(self.bucket.id_, filename, 1, None)
153 for entry in response[u'files']:153 for entry in response[u'files']:
154 file_version_info = b2.file_version.FileVersionInfoFactory.from_api_response(entry)154 file_version_info = b2.file_version.FileVersionInfoFactory.from_api_response(entry)
155 if file_version_info.file_name == filename:155 if file_version_info.file_name == filename:

Subscribers

People subscribed via source and target branches