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
1=== modified file 'CHANGELOG'
2--- CHANGELOG 2019-10-08 19:19:37 +0000
3+++ CHANGELOG 2019-10-14 03:45:51 +0000
4@@ -6,6 +6,11 @@
5 that duplicity's ssh_paramiko_backend.py was not handling
6 warning suppression and ended up clearing all warnings,
7 including those that default to off.
8+* Updated b2 backend to work with both v0 and v1 of b2sdk
9+* Fixed bug #1847885 - B2 fails on string concatenation.
10+ - use util.fsdecode() to get a string not bytes.
11+ - Partially fixed in bug #1843995, this applies same fix to
12+ remaining instances of the problem
13
14
15 New in v0.8.05 (2019/10/06)
16
17=== modified file 'Changelog.GNU'
18--- Changelog.GNU 2019-10-08 19:19:37 +0000
19+++ Changelog.GNU 2019-10-14 03:45:51 +0000
20@@ -1,3 +1,11 @@
21+2019-10-12 Adam Jacobs <alj@boxyfrog.com>
22+
23+ * Updated b2 backend to work with both v0 and v1 of b2sdk
24+ * Fixed bug #1847885 - B2 fails on string concatenation.
25+ - use util.fsdecode() to get a string not bytes.
26+ - Partially fixed in bug #1843995, this applies same fix to
27+ remaining instances of the problem
28+
29 2019-10-08 Kenneth Loafman <kenneth@loafman.com>
30
31 * Fixed Resouce warnings when using paramiko. It turns out
32
33=== modified file 'duplicity/backends/b2backend.py'
34--- duplicity/backends/b2backend.py 2019-10-05 15:55:30 +0000
35+++ duplicity/backends/b2backend.py 2019-10-14 03:45:51 +0000
36@@ -135,21 +135,21 @@
37 u"""
38 Delete filename from remote server
39 """
40- log.Log(u"Delete: %s" % self.path + filename, log.INFO)
41- file_version_info = self.file_info(quote_plus(self.path + filename))
42+ log.Log(u"Delete: %s" % self.path + util.fsdecode(filename), log.INFO)
43+ file_version_info = self.file_info(quote_plus(self.path + util.fsdecode(filename)))
44 self.bucket.delete_file_version(file_version_info.id_, file_version_info.file_name)
45
46 def _query(self, filename):
47 u"""
48 Get size info of filename
49 """
50- log.Log(u"Query: %s" % self.path + filename, log.INFO)
51- file_version_info = self.file_info(quote_plus(self.path + filename))
52+ log.Log(u"Query: %s" % self.path + util.fsdecode(filename), log.INFO)
53+ file_version_info = self.file_info(quote_plus(self.path + util.fsdecode(filename)))
54 return {u'size': file_version_info.size
55 if file_version_info is not None and file_version_info.size is not None else -1}
56
57 def file_info(self, filename):
58- response = self.bucket.list_file_names(filename, 1)
59+ response = self.bucket.api.session.list_file_names(self.bucket.id_, filename, 1, None)
60 for entry in response[u'files']:
61 file_version_info = b2.file_version.FileVersionInfoFactory.from_api_response(entry)
62 if file_version_info.file_name == filename:

Subscribers

People subscribed via source and target branches