Merge lp:~aaron-whitehouse/duplicity/bug_1620085_exclude-if-present-locked-folder into lp:~duplicity-team/duplicity/0.8-series
- bug_1620085_exclude-if-present-locked-folder
- Merge into 0.8-series
Status: | Rejected |
---|---|
Rejected by: | Kenneth Loafman |
Proposed branch: | lp:~aaron-whitehouse/duplicity/bug_1620085_exclude-if-present-locked-folder |
Merge into: | lp:~duplicity-team/duplicity/0.8-series |
Diff against target: |
579 lines (+280/-114) (has conflicts) 11 files modified
CHANGELOG (+34/-14) Changelog.GNU (+49/-26) README (+1/-1) README-REPO (+24/-7) duplicity/selection.py (+18/-4) po/duplicity.pot (+4/-0) testing/__init__.py (+5/-1) testing/functional/test_selection.py (+130/-49) testing/gnupg/gpg.conf (+0/-9) testing/test_code.py (+4/-1) tox.ini (+11/-2) Text conflict in CHANGELOG Text conflict in Changelog.GNU Text conflict in po/duplicity.pot |
To merge this branch: | bzr merge lp:~aaron-whitehouse/duplicity/bug_1620085_exclude-if-present-locked-folder |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Kenneth Loafman | Disapprove | ||
Review via email: mp+304924@code.launchpad.net |
Commit message
Description of the change
Aaron Whitehouse (aaron-whitehouse) wrote : | # |
Hi Kenneth,
Apologies for any confusion. This branch is based of the current 0.7-series branch, not lp:duplicity.
I deliberately proposed this for merging into the 0.7-series (off which it was based):
https:/
It looks like you then proposed this merge into the 0.8-series which has caused the conflicts?
My intention was that once it was merged into 0.7 we could then easily merge all changes in 0.7 up into 0.8 and wrap up both this and any other improvements/fixes in the 0.7 series. Or, if you don't like that plan, I can easily make the same fixes on a branch from the 0.8 series.
Kenneth Loafman (kenneth-loafman) wrote : | # |
Sorry, my confusion. Going to mark as rejected and clear the books.
Unmerged revisions
Preview Diff
1 | === modified file 'CHANGELOG' | |||
2 | --- CHANGELOG 2016-08-22 11:11:55 +0000 | |||
3 | +++ CHANGELOG 2016-09-05 14:30:45 +0000 | |||
4 | @@ -1,19 +1,21 @@ | |||
15 | 1 | New in v0.8.00 (2016/07/??) | 1 | New in v0.7.11 (2016/09/??) |
16 | 2 | --------------------------- | 2 | --------------------------- |
17 | 3 | * Merged in lp:~aaron-whitehouse/duplicity/remove-python26 | 3 | * Fixed bugs #815510 and #1615480 |
18 | 4 | - Remove Python 2.6 support references and tests. | 4 | - Changed default --volsize to 200MB |
19 | 5 | * Fixed bug #1600692 with patch from Wolfgang Rohdewald | 5 | * Merged in lp:~mstoll-de/duplicity/duplicity |
20 | 6 | - Allow symlink to have optional trailing slash during verify. | 6 | - Backblaze announced a new domain for the b2 api |
21 | 7 | * Merged in lp:~aaron-whitehouse/duplicity/07-fix_deja_dup_error_on_locked_files | 7 | |
22 | 8 | - Revert log.Error to log.Warn, as it was prior to the merge in rev 1224, | 8 | New in v0.7.10 (2016/08/20) |
23 | 9 | as this was affecting other applications (e.g. deja dup; Bug #1605939). | 9 | --------------------------- |
24 | 10 | * Merged in lp:~mwilck/duplicity/duplicity | 10 | * Merged in lp:~mwilck/duplicity/0.7-series |
25 | 11 | - Speedup of path_matches_glob() by about 8x. See | 11 | - Speedup of path_matches_glob() by about 8x. See |
27 | 12 | https://code.launchpad.net/~mwilck/duplicity/duplicity/+merge/301268 | 12 | https://code.launchpad.net/~mwilck/duplicity/0.7-series/+merge/301332 |
28 | 13 | for more details. | 13 | for more details. |
29 | 14 | * Remove -w from setsid in functional tests. | ||
30 | 14 | * Fixed conflict in merge from Martin Wilck and applied | 15 | * Fixed conflict in merge from Martin Wilck and applied |
31 | 15 | - https://code.launchpad.net/~mwilck/duplicity/0.7-series/+merge/301492 | 16 | - https://code.launchpad.net/~mwilck/duplicity/0.7-series/+merge/301492 |
32 | 16 | - merge fixes setsid usage in functional testing. | 17 | - merge fixes setsid usage in functional testing. |
33 | 18 | <<<<<<< TREE | ||
34 | 17 | * Fixed bug #1612472 with patch from David Cuthbert | 19 | * Fixed bug #1612472 with patch from David Cuthbert |
35 | 18 | - Restore from S3 fails with --with-prefix-archive if prefix includes '/' | 20 | - Restore from S3 fails with --with-prefix-archive if prefix includes '/' |
36 | 19 | * Merged in lp:~arashad.ahamad/duplicity/duplicity_latest | 21 | * Merged in lp:~arashad.ahamad/duplicity/duplicity_latest |
37 | @@ -24,6 +26,24 @@ | |||
38 | 24 | - Changed default --volsize to 200MB | 26 | - Changed default --volsize to 200MB |
39 | 25 | * Merged in lp:~mstoll-de/duplicity/duplicity | 27 | * Merged in lp:~mstoll-de/duplicity/duplicity |
40 | 26 | - Backblaze announced a new domain for the b2 api | 28 | - Backblaze announced a new domain for the b2 api |
41 | 29 | ======= | ||
42 | 30 | * Fixed bug #1612472 with patch from David Cuthbert | ||
43 | 31 | - Restore from S3 fails with --with-prefix-archive if prefix includes '/' | ||
44 | 32 | * Merged in lp:~arashad.ahamad/duplicity/duplicity_latest | ||
45 | 33 | - Changes for connecting to IBM Bluemix ObjectStorage. See man page. | ||
46 | 34 | * Merged in lp:~fenisilius/duplicity/acd_init_mkdir | ||
47 | 35 | - Allow duplicity to create remote folder | ||
48 | 36 | |||
49 | 37 | |||
50 | 38 | New in v0.7.09 (2016/07/24) | ||
51 | 39 | --------------------------- | ||
52 | 40 | * Fixed bug #1600692 with patch from Wolfgang Rohdewald | ||
53 | 41 | - Allow symlink to have optional trailing slash during verify. | ||
54 | 42 | * Merged in lp:~aaron-whitehouse/duplicity/07-fix_deja_dup_error_on_locked_files | ||
55 | 43 | - Revert log.Error to log.Warn, as it was prior to the merge in rev 1224, | ||
56 | 44 | as this was affecting other applications (e.g. deja dup; Bug #1605939). | ||
57 | 45 | * Merged in lp:~duplicity-team/duplicity/po-updates | ||
58 | 46 | >>>>>>> MERGE-SOURCE | ||
59 | 27 | 47 | ||
60 | 28 | 48 | ||
61 | 29 | New in v0.7.08 (2016/07/02) | 49 | New in v0.7.08 (2016/07/02) |
62 | @@ -81,6 +101,9 @@ | |||
63 | 81 | * Fixed bug #1570293 duplicity is very slow due to excessive fsync | 101 | * Fixed bug #1570293 duplicity is very slow due to excessive fsync |
64 | 82 | - removed flush() after write. | 102 | - removed flush() after write. |
65 | 83 | - revert to previous version | 103 | - revert to previous version |
66 | 104 | * Merged in lp:~aaron-whitehouse/duplicity/07-fix_deja_dup_error_on_locked_files | ||
67 | 105 | - Revert log.Error to log.Warn, as it was prior to the merge in rev 1224, | ||
68 | 106 | as this was affecting other applications (e.g. deja dup; Bug #1605939). | ||
69 | 84 | 107 | ||
70 | 85 | 108 | ||
71 | 86 | New in v0.7.07 (2016/04/10) | 109 | New in v0.7.07 (2016/04/10) |
72 | @@ -333,9 +356,6 @@ | |||
73 | 333 | * Merged in lp:~ed.so/duplicity/gpg.binary | 356 | * Merged in lp:~ed.so/duplicity/gpg.binary |
74 | 334 | - new parameter --gpg-binary allows user to point to a different gpg binary, | 357 | - new parameter --gpg-binary allows user to point to a different gpg binary, |
75 | 335 | not necessarily in path | 358 | not necessarily in path |
76 | 336 | * Merged in lp:~ed.so/duplicity/gpg.binary | ||
77 | 337 | - new parameter --gpg-binary allows user to point to a different gpg binary, | ||
78 | 338 | not necessarily in path | ||
79 | 339 | * Merged in lp:~aaron-whitehouse/duplicity/fix_POTFILES.in_and_run-tests | 359 | * Merged in lp:~aaron-whitehouse/duplicity/fix_POTFILES.in_and_run-tests |
80 | 340 | - Fixed two filename references in po/POTFILES.in, a mistake which crept in in | 360 | - Fixed two filename references in po/POTFILES.in, a mistake which crept in in |
81 | 341 | rev 1093 and caused testing/run-tests to fail with "IndexError: list index | 361 | rev 1093 and caused testing/run-tests to fail with "IndexError: list index |
82 | 342 | 362 | ||
83 | === modified file 'Changelog.GNU' | |||
84 | --- Changelog.GNU 2016-08-22 11:11:55 +0000 | |||
85 | +++ Changelog.GNU 2016-09-05 14:30:45 +0000 | |||
86 | @@ -1,22 +1,48 @@ | |||
106 | 1 | 2016-08-22 Kenneth Loafman <kenneth@loafman.com> | 1 | <<<<<<< TREE |
107 | 2 | 2 | 2016-08-22 Kenneth Loafman <kenneth@loafman.com> | |
108 | 3 | * Fixed bugs #815510 and #1615480 | 3 | |
109 | 4 | - Changed default --volsize to 200MB | 4 | * Fixed bugs #815510 and #1615480 |
110 | 5 | * Merged in lp:~mstoll-de/duplicity/duplicity | 5 | - Changed default --volsize to 200MB |
111 | 6 | - Backblaze announced a new domain for the b2 api | 6 | * Merged in lp:~mstoll-de/duplicity/duplicity |
112 | 7 | 7 | - Backblaze announced a new domain for the b2 api | |
113 | 8 | 2016-08-18 Kenneth Loafman <kenneth@loafman.com> | 8 | |
114 | 9 | 9 | 2016-08-18 Kenneth Loafman <kenneth@loafman.com> | |
115 | 10 | * Merged in lp:~fenisilius/duplicity/acd_init_mkdir | 10 | |
116 | 11 | - Allow duplicity to create remote folder | 11 | * Merged in lp:~fenisilius/duplicity/acd_init_mkdir |
117 | 12 | 12 | - Allow duplicity to create remote folder | |
118 | 13 | 2016-08-12 Kenneth Loafman <kenneth@loafman.com> | 13 | |
119 | 14 | 14 | 2016-08-12 Kenneth Loafman <kenneth@loafman.com> | |
120 | 15 | * Fixed bug #1612472 with patch from David Cuthbert | 15 | |
121 | 16 | - Restore from S3 fails with --with-prefix-archive if prefix includes '/' | 16 | * Fixed bug #1612472 with patch from David Cuthbert |
122 | 17 | * Merged in lp:~arashad.ahamad/duplicity/duplicity_latest | 17 | - Restore from S3 fails with --with-prefix-archive if prefix includes '/' |
123 | 18 | - Changes for connecting to IBM Bluemix ObjectStorage. See man page. | 18 | * Merged in lp:~arashad.ahamad/duplicity/duplicity_latest |
124 | 19 | 19 | - Changes for connecting to IBM Bluemix ObjectStorage. See man page. | |
125 | 20 | |||
126 | 21 | ======= | ||
127 | 22 | 2016-08-22 Kenneth Loafman <kenneth@loafman.com> | ||
128 | 23 | |||
129 | 24 | * Fixed bugs #815510 and #1615480 | ||
130 | 25 | - Changed default --volsize to 200MB | ||
131 | 26 | * Merged in lp:~mstoll-de/duplicity/duplicity | ||
132 | 27 | - Backblaze announced a new domain for the b2 api | ||
133 | 28 | |||
134 | 29 | 2016-08-20 Kenneth Loafman <kenneth@loafman.com> | ||
135 | 30 | |||
136 | 31 | * Prep for 0.7.10 | ||
137 | 32 | |||
138 | 33 | 2016-08-18 Kenneth Loafman <kenneth@loafman.com> | ||
139 | 34 | |||
140 | 35 | * Merged in lp:~fenisilius/duplicity/acd_init_mkdir | ||
141 | 36 | - Allow duplicity to create remote folder | ||
142 | 37 | |||
143 | 38 | 2016-08-12 Kenneth Loafman <kenneth@loafman.com> | ||
144 | 39 | |||
145 | 40 | * Fixed bug #1612472 with patch from David Cuthbert | ||
146 | 41 | - Restore from S3 fails with --with-prefix-archive if prefix includes '/' | ||
147 | 42 | * Merged in lp:~arashad.ahamad/duplicity/duplicity_latest | ||
148 | 43 | - Changes for connecting to IBM Bluemix ObjectStorage. See man page. | ||
149 | 44 | |||
150 | 45 | >>>>>>> MERGE-SOURCE | ||
151 | 20 | 2016-07-31 Kenneth Loafman <kenneth@loafman.com> | 46 | 2016-07-31 Kenneth Loafman <kenneth@loafman.com> |
152 | 21 | 47 | ||
153 | 22 | * Fixed conflict in merge from Martin Wilck and applied | 48 | * Fixed conflict in merge from Martin Wilck and applied |
154 | @@ -25,27 +51,24 @@ | |||
155 | 25 | 51 | ||
156 | 26 | 2016-07-28 Kenneth Loafman <kenneth@loafman.com> | 52 | 2016-07-28 Kenneth Loafman <kenneth@loafman.com> |
157 | 27 | 53 | ||
159 | 28 | * Merged in lp:~mwilck/duplicity/duplicity | 54 | * Merged in lp:~mwilck/duplicity/0.7-series |
160 | 29 | - Speedup of path_matches_glob() by about 8x. See | 55 | - Speedup of path_matches_glob() by about 8x. See |
162 | 30 | https://code.launchpad.net/~mwilck/duplicity/duplicity/+merge/301268 | 56 | https://code.launchpad.net/~mwilck/duplicity/0.7-series/+merge/301332 |
163 | 31 | for more details. | 57 | for more details. |
164 | 58 | * Remove -w from setsid in functional tests. | ||
165 | 32 | 59 | ||
166 | 33 | 2016-07-24 Kenneth Loafman <kenneth@loafman.com> | 60 | 2016-07-24 Kenneth Loafman <kenneth@loafman.com> |
167 | 34 | 61 | ||
168 | 35 | * Merged in lp:~aaron-whitehouse/duplicity/07-fix_deja_dup_error_on_locked_files | 62 | * Merged in lp:~aaron-whitehouse/duplicity/07-fix_deja_dup_error_on_locked_files |
169 | 36 | - Revert log.Error to log.Warn, as it was prior to the merge in rev 1224, | 63 | - Revert log.Error to log.Warn, as it was prior to the merge in rev 1224, |
170 | 37 | as this was affecting other applications (e.g. deja dup; Bug #1605939). | 64 | as this was affecting other applications (e.g. deja dup; Bug #1605939). |
171 | 65 | * Prep for 0.7.09 | ||
172 | 38 | 66 | ||
173 | 39 | 2016-07-20 Kenneth Loafman <kenneth@loafman.com> | 67 | 2016-07-20 Kenneth Loafman <kenneth@loafman.com> |
174 | 40 | 68 | ||
175 | 41 | * Fixed bug #1600692 with patch from Wolfgang Rohdewald | 69 | * Fixed bug #1600692 with patch from Wolfgang Rohdewald |
176 | 42 | - Allow symlink to have optional trailing slash during verify. | 70 | - Allow symlink to have optional trailing slash during verify. |
177 | 43 | 71 | ||
178 | 44 | 2016-07-03 Kenneth Loafman <kenneth@loafman.com> | ||
179 | 45 | |||
180 | 46 | * Merged in lp:~aaron-whitehouse/duplicity/remove-python26 | ||
181 | 47 | - Remove Python 2.6 support references and tests. | ||
182 | 48 | |||
183 | 49 | 2016-07-02 Kenneth Loafman <kenneth@loafman.com> | 72 | 2016-07-02 Kenneth Loafman <kenneth@loafman.com> |
184 | 50 | 73 | ||
185 | 51 | * Merged in lp:~aaron-whitehouse/duplicity/PEP8_W503_fixes | 74 | * Merged in lp:~aaron-whitehouse/duplicity/PEP8_W503_fixes |
186 | 52 | 75 | ||
187 | === modified file 'README' | |||
188 | --- README 2016-07-02 17:12:58 +0000 | |||
189 | +++ README 2016-09-05 14:30:45 +0000 | |||
190 | @@ -19,7 +19,7 @@ | |||
191 | 19 | 19 | ||
192 | 20 | REQUIREMENTS: | 20 | REQUIREMENTS: |
193 | 21 | 21 | ||
195 | 22 | * Python v2.7 or later | 22 | * Python v2.6 or later |
196 | 23 | * librsync v0.9.6 or later | 23 | * librsync v0.9.6 or later |
197 | 24 | * GnuPG v1.x for encryption | 24 | * GnuPG v1.x for encryption |
198 | 25 | * python-lockfile v0.9 or later for concurrency locking | 25 | * python-lockfile v0.9 or later for concurrency locking |
199 | 26 | 26 | ||
200 | === modified file 'README-REPO' | |||
201 | --- README-REPO 2016-07-02 17:12:58 +0000 | |||
202 | +++ README-REPO 2016-09-05 14:30:45 +0000 | |||
203 | @@ -47,18 +47,35 @@ | |||
204 | 47 | Please run all tests on your branch (run-tests) before proposing a merge, to | 47 | Please run all tests on your branch (run-tests) before proposing a merge, to |
205 | 48 | ensure that all tests pass. The decorator @unittest.expectedFailure can be used | 48 | ensure that all tests pass. The decorator @unittest.expectedFailure can be used |
206 | 49 | to commit a known-failing test case without breaking the test suite, for | 49 | to commit a known-failing test case without breaking the test suite, for |
208 | 50 | example to exhibit the behaviour in a bug report before it has been fixed. | 50 | example to exhibit the behaviour in a bug report before it has been fixed: |
209 | 51 | |||
210 | 52 | if sys.version_info < (2, 7): | ||
211 | 53 | import unittest2 as unittest | ||
212 | 54 | else: | ||
213 | 55 | import unittest | ||
214 | 56 | |||
215 | 57 | |||
216 | 58 | class TestClass(unittest.TestCase): | ||
217 | 59 | """Test class to show expectedFailure""" | ||
218 | 60 | |||
219 | 61 | @unittest.expectedFailure | ||
220 | 62 | def test_expected_failure(self): | ||
221 | 63 | """Test behaviour of expectedFailure""" | ||
222 | 64 | self.assertEqual(1, 2) | ||
223 | 51 | 65 | ||
224 | 52 | ----------------------------------------- | 66 | ----------------------------------------- |
225 | 53 | Testing against multiple Python versions: | 67 | Testing against multiple Python versions: |
226 | 54 | ----------------------------------------- | 68 | ----------------------------------------- |
227 | 55 | 69 | ||
233 | 56 | Duplicity uses tox to make it easy to test your code against multiple | 70 | Duplicity currently supports Python versions v2.6 or later. Duplicity uses tox |
234 | 57 | environments. Running tests using the commands above will automatically test | 71 | to make it easy to test your code against multiple Python versions. Running |
235 | 58 | code against different supported environments, including the versions of | 72 | tests using the commands above will automatically test code against both |
236 | 59 | dependencies used by the Launchpad build system. | 73 | Python v2.6 and v2.7, if you have both installed on your system. It will also |
237 | 60 | 74 | test against the versions of dependencies used by the Launchpad build system. | |
238 | 61 | You can test against a single environment, e.g. | 75 | You can test against a single environment, e.g. |
240 | 62 | tox -e py27 | 76 | tox -e py26 |
241 | 63 | for example if you are working on fixing a bug, but please do a full run-tests | 77 | for example if you are working on fixing a bug, but please do a full run-tests |
242 | 64 | before submitting a merge request. | 78 | before submitting a merge request. |
243 | 79 | |||
244 | 80 | For instructions on installing Python v2.6 on newer versions of Ubuntu, see | ||
245 | 81 | https://launchpad.net/~fkrull/+archive/ubuntu/deadsnakes | ||
246 | 65 | 82 | ||
247 | === modified file 'duplicity/selection.py' | |||
248 | --- duplicity/selection.py 2016-07-27 11:56:07 +0000 | |||
249 | +++ duplicity/selection.py 2016-09-05 14:30:45 +0000 | |||
250 | @@ -447,10 +447,24 @@ | |||
251 | 447 | 447 | ||
252 | 448 | def exclude_sel_func(path): | 448 | def exclude_sel_func(path): |
253 | 449 | # do not follow symbolic links when checking for file existence! | 449 | # do not follow symbolic links when checking for file existence! |
258 | 450 | if path.isdir() and path.append(filename).exists(): | 450 | if path.isdir(): |
259 | 451 | return 0 | 451 | # First check path is read accessible |
260 | 452 | else: | 452 | if not (os.access(path.name, os.R_OK)): |
261 | 453 | return None | 453 | # Path is not read accessible |
262 | 454 | # ToDo: Ideally this error would only show if the folder | ||
263 | 455 | # was ultimately included by the full set of selection | ||
264 | 456 | # functions. Currently this will give an error for any | ||
265 | 457 | # locked directory within the folder being backed up. | ||
266 | 458 | log.Warn(_( | ||
267 | 459 | "Error accessing possibly locked file %s") % util.ufn( | ||
268 | 460 | path.name), | ||
269 | 461 | log.WarningCode.cannot_read, util.escape(path.name)) | ||
270 | 462 | if diffdir.stats: | ||
271 | 463 | diffdir.stats.Errors += 1 | ||
272 | 464 | elif path.append(filename).exists(): | ||
273 | 465 | return 0 | ||
274 | 466 | else: | ||
275 | 467 | return None | ||
276 | 454 | 468 | ||
277 | 455 | if include == 0: | 469 | if include == 0: |
278 | 456 | sel_func = exclude_sel_func | 470 | sel_func = exclude_sel_func |
279 | 457 | 471 | ||
280 | === modified file 'po/duplicity.pot' | |||
281 | --- po/duplicity.pot 2016-08-18 16:06:51 +0000 | |||
282 | +++ po/duplicity.pot 2016-09-05 14:30:45 +0000 | |||
283 | @@ -8,7 +8,11 @@ | |||
284 | 8 | msgstr "" | 8 | msgstr "" |
285 | 9 | "Project-Id-Version: PACKAGE VERSION\n" | 9 | "Project-Id-Version: PACKAGE VERSION\n" |
286 | 10 | "Report-Msgid-Bugs-To: Kenneth Loafman <kenneth@loafman.com>\n" | 10 | "Report-Msgid-Bugs-To: Kenneth Loafman <kenneth@loafman.com>\n" |
287 | 11 | <<<<<<< TREE | ||
288 | 11 | "POT-Creation-Date: 2016-08-18 10:50-0500\n" | 12 | "POT-Creation-Date: 2016-08-18 10:50-0500\n" |
289 | 13 | ======= | ||
290 | 14 | "POT-Creation-Date: 2016-08-20 14:02-0500\n" | ||
291 | 15 | >>>>>>> MERGE-SOURCE | ||
292 | 12 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | 16 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
293 | 13 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | 17 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
294 | 14 | "Language-Team: LANGUAGE <LL@li.org>\n" | 18 | "Language-Team: LANGUAGE <LL@li.org>\n" |
295 | 15 | 19 | ||
296 | === modified file 'testing/__init__.py' | |||
297 | --- testing/__init__.py 2016-07-02 19:39:05 +0000 | |||
298 | +++ testing/__init__.py 2016-09-05 14:30:45 +0000 | |||
299 | @@ -21,7 +21,11 @@ | |||
300 | 21 | import os | 21 | import os |
301 | 22 | import sys | 22 | import sys |
302 | 23 | import time | 23 | import time |
304 | 24 | import unittest | 24 | |
305 | 25 | if sys.version_info < (2, 7): | ||
306 | 26 | import unittest2 as unittest | ||
307 | 27 | else: | ||
308 | 28 | import unittest | ||
309 | 25 | 29 | ||
310 | 26 | from duplicity import backend | 30 | from duplicity import backend |
311 | 27 | from duplicity import globals | 31 | from duplicity import globals |
312 | 28 | 32 | ||
313 | === modified file 'testing/functional/test_selection.py' | |||
314 | --- testing/functional/test_selection.py 2015-07-31 08:22:31 +0000 | |||
315 | +++ testing/functional/test_selection.py 2016-09-05 14:30:45 +0000 | |||
316 | @@ -837,6 +837,57 @@ | |||
317 | 837 | self.restore_and_check() | 837 | self.restore_and_check() |
318 | 838 | 838 | ||
319 | 839 | 839 | ||
320 | 840 | class TestTrailingSlash2(IncludeExcludeFunctionalTest): | ||
321 | 841 | """ This tests the behaviour of globbing strings with a trailing slash""" | ||
322 | 842 | # See Bug #1479545 (https://bugs.launchpad.net/duplicity/+bug/1479545) | ||
323 | 843 | |||
324 | 844 | def test_no_trailing_slash(self): | ||
325 | 845 | """ Test that including 1.py works as expected""" | ||
326 | 846 | self.backup("full", "testfiles/select2", | ||
327 | 847 | options=["--include", "testfiles/select2/1.py", | ||
328 | 848 | "--exclude", "**"]) | ||
329 | 849 | self.restore() | ||
330 | 850 | restore_dir = 'testfiles/restore_out' | ||
331 | 851 | restored = self.directory_tree_to_list_of_lists(restore_dir) | ||
332 | 852 | self.assertEqual(restored, [['1.py']]) | ||
333 | 853 | |||
334 | 854 | def test_trailing_slash(self): | ||
335 | 855 | """ Test that globs with a trailing slash only match directories""" | ||
336 | 856 | # Regression test for Bug #1479545 | ||
337 | 857 | # (https://bugs.launchpad.net/duplicity/+bug/1479545) | ||
338 | 858 | self.backup("full", "testfiles/select2", | ||
339 | 859 | options=["--include", "testfiles/select2/1.py/", | ||
340 | 860 | "--exclude", "**"]) | ||
341 | 861 | self.restore() | ||
342 | 862 | restore_dir = 'testfiles/restore_out' | ||
343 | 863 | restored = self.directory_tree_to_list_of_lists(restore_dir) | ||
344 | 864 | self.assertEqual(restored, []) | ||
345 | 865 | |||
346 | 866 | def test_include_files_not_subdirectories(self): | ||
347 | 867 | """ Test that a trailing slash glob followed by a * glob only matches | ||
348 | 868 | files and not subdirectories""" | ||
349 | 869 | self.backup("full", "testfiles/select2", | ||
350 | 870 | options=["--exclude", "testfiles/select2/*/", | ||
351 | 871 | "--include", "testfiles/select2/*", | ||
352 | 872 | "--exclude", "**"]) | ||
353 | 873 | self.restore() | ||
354 | 874 | restore_dir = 'testfiles/restore_out' | ||
355 | 875 | restored = self.directory_tree_to_list_of_lists(restore_dir) | ||
356 | 876 | self.assertEqual(restored, [['1.doc', '1.py']]) | ||
357 | 877 | |||
358 | 878 | def test_include_subdirectories_not_files(self): | ||
359 | 879 | """ Test that a trailing slash glob only matches directories""" | ||
360 | 880 | self.backup("full", "testfiles/select2", | ||
361 | 881 | options=["--include", "testfiles/select2/1/1sub1/**/", | ||
362 | 882 | "--exclude", "testfiles/select2/1/1sub1/**", | ||
363 | 883 | "--exclude", "**"]) | ||
364 | 884 | self.restore() | ||
365 | 885 | restore_dir = 'testfiles/restore_out' | ||
366 | 886 | restored = self.directory_tree_to_list_of_lists(restore_dir) | ||
367 | 887 | self.assertEqual(restored, [['1'], ['1sub1'], | ||
368 | 888 | ['1sub1sub1', '1sub1sub2', '1sub1sub3']]) | ||
369 | 889 | |||
370 | 890 | |||
371 | 840 | class TestGlobbingReplacement(IncludeExcludeFunctionalTest): | 891 | class TestGlobbingReplacement(IncludeExcludeFunctionalTest): |
372 | 841 | """ This tests the behaviour of the extended shell globbing pattern replacement functions.""" | 892 | """ This tests the behaviour of the extended shell globbing pattern replacement functions.""" |
373 | 842 | # See the manual for a description of behaviours, but in summary: | 893 | # See the manual for a description of behaviours, but in summary: |
374 | @@ -875,55 +926,85 @@ | |||
375 | 875 | self.assertEqual(restored, self.expected_restored_tree) | 926 | self.assertEqual(restored, self.expected_restored_tree) |
376 | 876 | 927 | ||
377 | 877 | 928 | ||
427 | 878 | class TestTrailingSlash(IncludeExcludeFunctionalTest): | 929 | class TestExcludeIfPresent(IncludeExcludeFunctionalTest): |
428 | 879 | """ This tests the behaviour of globbing strings with a trailing slash""" | 930 | """ This tests the behaviour of duplicity's --exclude-if-present option""" |
429 | 880 | # See Bug #1479545 (https://bugs.launchpad.net/duplicity/+bug/1479545) | 931 | |
430 | 881 | 932 | def test_exclude_if_present_baseline(self): | |
431 | 882 | def test_no_trailing_slash(self): | 933 | """ Test that duplicity normally backs up files""" |
432 | 883 | """ Test that including 1.py works as expected""" | 934 | with open("testfiles/select2/1/1sub1/1sub1sub1/.nobackup", "w") as tag: |
433 | 884 | self.backup("full", "testfiles/select2", | 935 | tag.write("Files in this folder should not be backed up.") |
434 | 885 | options=["--include", "testfiles/select2/1.py", | 936 | self.backup("full", "testfiles/select2/1/1sub1", |
435 | 886 | "--exclude", "**"]) | 937 | options=["--include", "testfiles/select2/1/1sub1/1sub1sub1/*", |
436 | 887 | self.restore() | 938 | "--exclude", "**"]) |
437 | 888 | restore_dir = 'testfiles/restore_out' | 939 | self.restore() |
438 | 889 | restored = self.directory_tree_to_list_of_lists(restore_dir) | 940 | restore_dir = 'testfiles/restore_out' |
439 | 890 | self.assertEqual(restored, [['1.py']]) | 941 | restored = self.directory_tree_to_list_of_lists(restore_dir) |
440 | 891 | 942 | self.assertEqual(restored, [['1sub1sub1'], | |
441 | 892 | def test_trailing_slash(self): | 943 | ['.nobackup', '1sub1sub1_file.txt']]) |
442 | 893 | """ Test that globs with a trailing slash only match directories""" | 944 | |
443 | 894 | # ToDo: Bug #1479545 | 945 | def test_exclude_if_present_excludes(self): |
444 | 895 | # (https://bugs.launchpad.net/duplicity/+bug/1479545) | 946 | """ Test that duplicity excludes files with relevant tag""" |
445 | 896 | self.backup("full", "testfiles/select2", | 947 | with open("testfiles/select2/1/1sub1/1sub1sub1/.nobackup", "w") as tag: |
446 | 897 | options=["--include", "testfiles/select2/1.py/", | 948 | tag.write("Files in this folder should not be backed up.") |
447 | 898 | "--exclude", "**"]) | 949 | self.backup("full", "testfiles/select2/1/1sub1", |
448 | 899 | self.restore() | 950 | options=["--exclude-if-present", ".nobackup", |
449 | 900 | restore_dir = 'testfiles/restore_out' | 951 | "--include", "testfiles/select2/1/1sub1/1sub1sub1/*", |
450 | 901 | restored = self.directory_tree_to_list_of_lists(restore_dir) | 952 | "--exclude", "**"]) |
451 | 902 | self.assertEqual(restored, []) | 953 | self.restore() |
452 | 903 | 954 | restore_dir = 'testfiles/restore_out' | |
453 | 904 | def test_include_files_not_subdirectories(self): | 955 | restored = self.directory_tree_to_list_of_lists(restore_dir) |
454 | 905 | """ Test that a trailing slash glob followed by a * glob only matches | 956 | self.assertEqual(restored, []) |
455 | 906 | files and not subdirectories""" | 957 | |
456 | 907 | self.backup("full", "testfiles/select2", | 958 | def test_exclude_if_present_excludes_2(self): |
457 | 908 | options=["--exclude", "testfiles/select2/*/", | 959 | """ Test that duplicity excludes files with relevant tag""" |
458 | 909 | "--include", "testfiles/select2/*", | 960 | with open("testfiles/select2/1/1sub1/1sub1sub1/EXCLUDE.tag", "w") as tag: |
459 | 910 | "--exclude", "**"]) | 961 | tag.write("Files in this folder should also not be backed up.") |
460 | 911 | self.restore() | 962 | self.backup("full", "testfiles/select2/1/1sub1", |
461 | 912 | restore_dir = 'testfiles/restore_out' | 963 | options=["--exclude-if-present", "EXCLUDE.tag", |
462 | 913 | restored = self.directory_tree_to_list_of_lists(restore_dir) | 964 | "--include", "testfiles/select2/1/1sub1/1sub1sub1/*", |
463 | 914 | self.assertEqual(restored, [['1.doc', '1.py']]) | 965 | "--exclude", "**"]) |
464 | 915 | 966 | self.restore() | |
465 | 916 | def test_include_subdirectories_not_files(self): | 967 | restore_dir = 'testfiles/restore_out' |
466 | 917 | """ Test that a trailing slash glob only matches directories""" | 968 | restored = self.directory_tree_to_list_of_lists(restore_dir) |
467 | 918 | self.backup("full", "testfiles/select2", | 969 | self.assertEqual(restored, []) |
468 | 919 | options=["--include", "testfiles/select2/1/1sub1/**/", | 970 | |
469 | 920 | "--exclude", "testfiles/select2/1/1sub1/**", | 971 | |
470 | 921 | "--exclude", "**"]) | 972 | class TestLockedFoldersNoError(IncludeExcludeFunctionalTest): |
471 | 922 | self.restore() | 973 | """ This tests that inaccessible folders do not cause an error""" |
472 | 923 | restore_dir = 'testfiles/restore_out' | 974 | |
473 | 924 | restored = self.directory_tree_to_list_of_lists(restore_dir) | 975 | def test_locked_baseline(self): |
474 | 925 | self.assertEqual(restored, [['1'], ['1sub1'], | 976 | """ Test no error if locked in path but excluded""" |
475 | 926 | ['1sub1sub1', '1sub1sub2', '1sub1sub3']]) | 977 | folder_to_lock = "testfiles/select2/1/1sub1/1sub1sub3" |
476 | 978 | initial_mode = os.stat(folder_to_lock).st_mode | ||
477 | 979 | os.chmod(folder_to_lock, 0o0000) | ||
478 | 980 | self.backup("full", "testfiles/select2/1/1sub1", | ||
479 | 981 | options=["--include", "testfiles/select2/1/1sub1/1sub1sub1/*", | ||
480 | 982 | "--exclude", "**"]) | ||
481 | 983 | os.chmod(folder_to_lock, initial_mode) | ||
482 | 984 | self.restore() | ||
483 | 985 | restore_dir = 'testfiles/restore_out' | ||
484 | 986 | restored = self.directory_tree_to_list_of_lists(restore_dir) | ||
485 | 987 | self.assertEqual(restored, [['1sub1sub1'], | ||
486 | 988 | ['1sub1sub1_file.txt']]) | ||
487 | 989 | |||
488 | 990 | def test_locked_excl_if_present(self): | ||
489 | 991 | """ Test no error if excluded locked with --exclude-if-present""" | ||
490 | 992 | # Regression test for Bug #1620085 | ||
491 | 993 | # https://bugs.launchpad.net/duplicity/+bug/1620085 | ||
492 | 994 | folder_to_lock = "testfiles/select2/1/1sub1/1sub1sub3" | ||
493 | 995 | initial_mode = os.stat(folder_to_lock).st_mode | ||
494 | 996 | os.chmod(folder_to_lock, 0o0000) | ||
495 | 997 | self.backup("full", "testfiles/select2/1/1sub1", | ||
496 | 998 | options=["--exclude-if-present", "EXCLUDE.tag", | ||
497 | 999 | "--include", "testfiles/select2/1/1sub1/1sub1sub1/*", | ||
498 | 1000 | "--exclude", "**"]) | ||
499 | 1001 | os.chmod(folder_to_lock, initial_mode) | ||
500 | 1002 | self.restore() | ||
501 | 1003 | restore_dir = 'testfiles/restore_out' | ||
502 | 1004 | restored = self.directory_tree_to_list_of_lists(restore_dir) | ||
503 | 1005 | self.assertEqual(restored, [['1sub1sub1'], | ||
504 | 1006 | ['1sub1sub1_file.txt']]) | ||
505 | 1007 | |||
506 | 927 | 1008 | ||
507 | 928 | if __name__ == "__main__": | 1009 | if __name__ == "__main__": |
508 | 929 | unittest.main() | 1010 | unittest.main() |
509 | 930 | 1011 | ||
510 | === added file 'testing/gnupg/gpg.conf' | |||
511 | --- testing/gnupg/gpg.conf 1970-01-01 00:00:00 +0000 | |||
512 | +++ testing/gnupg/gpg.conf 2016-09-05 14:30:45 +0000 | |||
513 | @@ -0,0 +1,9 @@ | |||
514 | 1 | # gpg2 doesn't try all secrets by default, so add this option | ||
515 | 2 | # Otherwise the tests with hidden encryption key will fail | ||
516 | 3 | try-all-secrets | ||
517 | 4 | |||
518 | 5 | # gpg2 2.1.13 has a bug that prevents the line above from working | ||
519 | 6 | # (https://bugs.gnupg.org/gnupg/issue1985) | ||
520 | 7 | # Uncomment the line below if you have gnupg2 2.1.13 | ||
521 | 8 | # (but that line will break gpg 1.x, so we can't use it by default) | ||
522 | 9 | #try-secret-key 96B629431B77DC52B1917B40839E6A2856538CCF | ||
523 | 0 | 10 | ||
524 | === removed file 'testing/gnupg/gpg.conf' | |||
525 | --- testing/gnupg/gpg.conf 2016-08-01 14:57:22 +0000 | |||
526 | +++ testing/gnupg/gpg.conf 1970-01-01 00:00:00 +0000 | |||
527 | @@ -1,9 +0,0 @@ | |||
528 | 1 | # gpg2 doesn't try all secrets by default, so add this option | ||
529 | 2 | # Otherwise the tests with hidden encryption key will fail | ||
530 | 3 | try-all-secrets | ||
531 | 4 | |||
532 | 5 | # gpg2 2.1.13 has a bug that prevents the line above from working | ||
533 | 6 | # (https://bugs.gnupg.org/gnupg/issue1985) | ||
534 | 7 | # Uncomment the line below if you have gnupg2 2.1.13 | ||
535 | 8 | # (but that line will break gpg 1.x, so we can't use it by default) | ||
536 | 9 | #try-secret-key 96B629431B77DC52B1917B40839E6A2856538CCF | ||
537 | 10 | 0 | ||
538 | === modified file 'testing/test_code.py' | |||
539 | --- testing/test_code.py 2016-07-02 19:39:05 +0000 | |||
540 | +++ testing/test_code.py 2016-09-05 14:30:45 +0000 | |||
541 | @@ -22,7 +22,10 @@ | |||
542 | 22 | import sys | 22 | import sys |
543 | 23 | import subprocess | 23 | import subprocess |
544 | 24 | 24 | ||
546 | 25 | import unittest | 25 | if sys.version_info < (2, 7): |
547 | 26 | import unittest2 as unittest # @UnresolvedImport @UnusedImport | ||
548 | 27 | else: | ||
549 | 28 | import unittest # @Reimport | ||
550 | 26 | 29 | ||
551 | 27 | from . import _top_dir, DuplicityTestCase # @IgnorePep8 | 30 | from . import _top_dir, DuplicityTestCase # @IgnorePep8 |
552 | 28 | 31 | ||
553 | 29 | 32 | ||
554 | === modified file 'tox.ini' | |||
555 | --- tox.ini 2016-07-02 19:33:34 +0000 | |||
556 | +++ tox.ini 2016-09-05 14:30:45 +0000 | |||
557 | @@ -1,5 +1,14 @@ | |||
558 | 1 | [tox] | 1 | [tox] |
560 | 2 | envlist=py27,lpbuildd-precise | 2 | envlist=py26,py27,lpbuildd-precise |
561 | 3 | |||
562 | 4 | [testenv:py26] | ||
563 | 5 | setenv= | ||
564 | 6 | RUN_CODE_TESTS=0 | ||
565 | 7 | deps= | ||
566 | 8 | mock==0.7.2 | ||
567 | 9 | pexpect==2.4 | ||
568 | 10 | ptyprocess==0.4 | ||
569 | 11 | unittest2 | ||
570 | 3 | 12 | ||
571 | 4 | [testenv:py27] | 13 | [testenv:py27] |
572 | 5 | setenv= | 14 | setenv= |
573 | @@ -20,5 +29,5 @@ | |||
574 | 20 | {envpython} {toxinidir}/setup.py test {posargs} | 29 | {envpython} {toxinidir}/setup.py test {posargs} |
575 | 21 | 30 | ||
576 | 22 | [pep8] | 31 | [pep8] |
578 | 23 | ignore=E402,E731 | 32 | ignore=E402,E501,E731,W503 |
579 | 24 | max-line-length=120 | 33 | max-line-length=120 |
Aaron, there are a lot of conflicts in this merge. Would you mind pulling the latest lp:duplicity and generating the merge again?