Merge lp:~nataliabidart/magicicada-client/use-protocol-from-wheel into lp:magicicada-client
- use-protocol-from-wheel
- Merge into trunk
Proposed by
Natalia Bidart
Status: | Merged |
---|---|
Approved by: | Natalia Bidart |
Approved revision: | 1443 |
Merged at revision: | 1443 |
Proposed branch: | lp:~nataliabidart/magicicada-client/use-protocol-from-wheel |
Merge into: | lp:magicicada-client |
Diff against target: |
544 lines (+69/-125) 18 files modified
.bzrignore (+0/-1) .coveragerc (+0/-27) HACKING (+2/-6) Makefile (+3/-15) dependencies.txt (+0/-1) requirements.txt (+1/-0) ubuntuone/platform/tests/linux/test_vm.py (+3/-4) ubuntuone/syncdaemon/action_queue.py (+12/-9) ubuntuone/syncdaemon/hash_queue.py (+3/-8) ubuntuone/syncdaemon/interaction_interfaces.py (+3/-5) ubuntuone/syncdaemon/sync.py (+6/-6) ubuntuone/syncdaemon/tests/test_action_queue.py (+7/-7) ubuntuone/syncdaemon/tests/test_hashqueue.py (+6/-7) ubuntuone/syncdaemon/tests/test_interaction_interfaces.py (+6/-8) ubuntuone/syncdaemon/tests/test_localrescan.py (+2/-3) ubuntuone/syncdaemon/tests/test_sync.py (+4/-5) ubuntuone/syncdaemon/tests/test_vm.py (+5/-8) ubuntuone/syncdaemon/volume_manager.py (+6/-5) |
To merge this branch: | bzr merge lp:~nataliabidart/magicicada-client/use-protocol-from-wheel |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Facundo Batista | Approve | ||
Review via email: mp+343270@code.launchpad.net |
Commit message
- Use protocol from wheel release.
- Fix copyright headers from modified files.
Description of the change
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 '.bzrignore' | |||
2 | --- .bzrignore 2016-10-24 20:59:39 +0000 | |||
3 | +++ .bzrignore 2018-04-14 23:49:33 +0000 | |||
4 | @@ -14,4 +14,3 @@ | |||
5 | 14 | .protocol | 14 | .protocol |
6 | 15 | clientdefs.py | 15 | clientdefs.py |
7 | 16 | logging.conf | 16 | logging.conf |
8 | 17 | ubuntuone/storageprotocol | ||
9 | 18 | 17 | ||
10 | === removed file '.coveragerc' | |||
11 | --- .coveragerc 2010-04-30 14:30:34 +0000 | |||
12 | +++ .coveragerc 1970-01-01 00:00:00 +0000 | |||
13 | @@ -1,27 +0,0 @@ | |||
14 | 1 | # .coveragerc to control coverage.py | ||
15 | 2 | [run] | ||
16 | 3 | branch = True | ||
17 | 4 | |||
18 | 5 | [report] | ||
19 | 6 | # Regexes for lines to exclude from consideration | ||
20 | 7 | exclude_lines = | ||
21 | 8 | # Have to re-enable the standard pragma | ||
22 | 9 | pragma: no cover | ||
23 | 10 | |||
24 | 11 | # Don't complain about missing debug-only code: | ||
25 | 12 | def __repr__ | ||
26 | 13 | if self\.debug | ||
27 | 14 | |||
28 | 15 | # Don't complain if tests don't hit defensive assertion code: | ||
29 | 16 | raise AssertionError | ||
30 | 17 | raise NotImplementedError | ||
31 | 18 | |||
32 | 19 | # Don't complain if non-runnable code isn't run: | ||
33 | 20 | if 0: | ||
34 | 21 | if __name__ == .__main__.: | ||
35 | 22 | |||
36 | 23 | ignore_errors = True | ||
37 | 24 | |||
38 | 25 | omit = | ||
39 | 26 | /usr | ||
40 | 27 | tests | ||
41 | 28 | 0 | ||
42 | === modified file 'HACKING' | |||
43 | --- HACKING 2018-03-08 18:32:01 +0000 | |||
44 | +++ HACKING 2018-04-14 23:49:33 +0000 | |||
45 | @@ -1,9 +1,5 @@ | |||
52 | 1 | In order to run tests in ubuntuone-client, you will need to have a built | 1 | In order to run tests in ubuntuone-client, you can simply bootstrap and |
53 | 2 | version of ubuntuone-storage-protocol in a tree, or installed. You can | 2 | everything will be setup automagically: |
48 | 3 | specify the path to a built tree with the --with-protocol option to configure, | ||
49 | 4 | or autogen.sh (which calls configure after creating it). | ||
50 | 5 | |||
51 | 6 | Or you can simply bootstrap and everything will happen automagically: | ||
54 | 7 | 3 | ||
55 | 8 | $: sudo apt-get install make | 4 | $: sudo apt-get install make |
56 | 9 | $: make bootstrap | 5 | $: make bootstrap |
57 | 10 | 6 | ||
58 | === modified file 'Makefile' | |||
59 | --- Makefile 2018-03-25 11:12:10 +0000 | |||
60 | +++ Makefile 2018-04-14 23:49:33 +0000 | |||
61 | @@ -28,31 +28,19 @@ | |||
62 | 28 | # For further info, check http://launchpad.net/magicicada-client | 28 | # For further info, check http://launchpad.net/magicicada-client |
63 | 29 | 29 | ||
64 | 30 | ENV = $(CURDIR)/.env | 30 | ENV = $(CURDIR)/.env |
65 | 31 | PROTOCOL_DIR = $(CURDIR)/.protocol | ||
66 | 32 | PROTOCOL_LINK = ubuntuone/storageprotocol | ||
67 | 33 | 31 | ||
68 | 34 | deps: | 32 | deps: |
69 | 35 | cat dependencies.txt | sudo xargs apt-get install -y --no-install-recommends | 33 | cat dependencies.txt | sudo xargs apt-get install -y --no-install-recommends |
70 | 36 | cat dependencies-devel.txt | sudo xargs apt-get install -y --no-install-recommends | 34 | cat dependencies-devel.txt | sudo xargs apt-get install -y --no-install-recommends |
71 | 37 | 35 | ||
72 | 38 | $(PROTOCOL_DIR): | ||
73 | 39 | bzr branch lp:magicicada-protocol $(PROTOCOL_DIR) | ||
74 | 40 | |||
75 | 41 | $(PROTOCOL_LINK): $(PROTOCOL_DIR) | ||
76 | 42 | ln -s $(PROTOCOL_DIR)/$(PROTOCOL_LINK) $(PROTOCOL_LINK) | ||
77 | 43 | |||
78 | 44 | update-protocol: | ||
79 | 45 | cd $(PROTOCOL_DIR) && bzr pull && python setup.py build | ||
80 | 46 | |||
81 | 47 | build: | 36 | build: |
82 | 48 | $(ENV)/bin/python setup.py build | 37 | $(ENV)/bin/python setup.py build |
83 | 49 | 38 | ||
85 | 50 | bootstrap: deps $(PROTOCOL_DIR) $(PROTOCOL_LINK) update-protocol venv build | 39 | bootstrap: deps venv build |
86 | 51 | 40 | ||
87 | 52 | docker-bootstrap: clean | 41 | docker-bootstrap: clean |
88 | 53 | cat dependencies.txt | xargs apt-get install -y --no-install-recommends | 42 | cat dependencies.txt | xargs apt-get install -y --no-install-recommends |
89 | 54 | cat dependencies-devel.txt | xargs apt-get install -y --no-install-recommends | 43 | cat dependencies-devel.txt | xargs apt-get install -y --no-install-recommends |
90 | 55 | $(MAKE) $(PROTOCOL_DIR) $(PROTOCOL_LINK) update-protocol | ||
91 | 56 | 44 | ||
92 | 57 | venv: | 45 | venv: |
93 | 58 | virtualenv --system-site-packages $(ENV) | 46 | virtualenv --system-site-packages $(ENV) |
94 | @@ -65,8 +53,8 @@ | |||
95 | 65 | ./run-tests | 53 | ./run-tests |
96 | 66 | 54 | ||
97 | 67 | clean: | 55 | clean: |
99 | 68 | rm -rf build _trial_temp $(PROTOCOL_DIR) $(PROTOCOL_LINK) $(ENV) | 56 | rm -rf build _trial_temp $(ENV) |
100 | 69 | find -name '*.pyc' -delete | 57 | find -name '*.pyc' -delete |
101 | 70 | 58 | ||
102 | 71 | .PHONY: | 59 | .PHONY: |
104 | 72 | deps update-protocol bootstrap lint test clean | 60 | deps bootstrap lint test clean |
105 | 73 | 61 | ||
106 | === modified file 'dependencies.txt' | |||
107 | --- dependencies.txt 2018-03-14 21:01:56 +0000 | |||
108 | +++ dependencies.txt 2018-04-14 23:49:33 +0000 | |||
109 | @@ -1,5 +1,4 @@ | |||
110 | 1 | gir1.2-soup-2.4 | 1 | gir1.2-soup-2.4 |
111 | 2 | protobuf-compiler | ||
112 | 3 | python-configglue | 2 | python-configglue |
113 | 4 | python-dirspec | 3 | python-dirspec |
114 | 5 | python-distutils-extra | 4 | python-distutils-extra |
115 | 6 | 5 | ||
116 | === modified file 'requirements.txt' | |||
117 | --- requirements.txt 2018-03-18 11:59:08 +0000 | |||
118 | +++ requirements.txt 2018-04-14 23:49:33 +0000 | |||
119 | @@ -1,1 +1,2 @@ | |||
120 | 1 | Send2Trash==1.5.0 | 1 | Send2Trash==1.5.0 |
121 | 2 | magicicadaprotocol==2.0 | ||
122 | 2 | 3 | ||
123 | === modified file 'ubuntuone/platform/tests/linux/test_vm.py' | |||
124 | --- ubuntuone/platform/tests/linux/test_vm.py 2016-07-30 21:58:48 +0000 | |||
125 | +++ ubuntuone/platform/tests/linux/test_vm.py 2018-04-14 23:49:33 +0000 | |||
126 | @@ -1,8 +1,7 @@ | |||
130 | 1 | # tests.platform.linux - linux platform tests | 1 | # -*- coding: utf-8 -*- |
128 | 2 | # | ||
129 | 3 | # Author: Guillermo Gonzalez <guillermo.gonzalez@canonical.com> | ||
131 | 4 | # | 2 | # |
132 | 5 | # Copyright 2010-2012 Canonical Ltd. | 3 | # Copyright 2010-2012 Canonical Ltd. |
133 | 4 | # Copyright 2015-2018 Chicharreros (https://launchpad.net/~chicharreros) | ||
134 | 6 | # | 5 | # |
135 | 7 | # This program is free software: you can redistribute it and/or modify it | 6 | # This program is free software: you can redistribute it and/or modify it |
136 | 8 | # under the terms of the GNU General Public License version 3, as published | 7 | # under the terms of the GNU General Public License version 3, as published |
137 | @@ -33,10 +32,10 @@ | |||
138 | 33 | import os | 32 | import os |
139 | 34 | import uuid | 33 | import uuid |
140 | 35 | 34 | ||
141 | 35 | from magicicadaprotocol import request | ||
142 | 36 | from twisted.internet import defer | 36 | from twisted.internet import defer |
143 | 37 | 37 | ||
144 | 38 | from contrib.testing.testcase import FakeMain | 38 | from contrib.testing.testcase import FakeMain |
145 | 39 | from ubuntuone.storageprotocol import request | ||
146 | 40 | from ubuntuone.syncdaemon.tests.test_vm import ( | 39 | from ubuntuone.syncdaemon.tests.test_vm import ( |
147 | 41 | MetadataTestCase, | 40 | MetadataTestCase, |
148 | 42 | BaseVolumeManagerTests, | 41 | BaseVolumeManagerTests, |
149 | 43 | 42 | ||
150 | === modified file 'ubuntuone/syncdaemon/action_queue.py' | |||
151 | --- ubuntuone/syncdaemon/action_queue.py 2018-03-14 21:01:56 +0000 | |||
152 | +++ ubuntuone/syncdaemon/action_queue.py 2018-04-14 23:49:33 +0000 | |||
153 | @@ -42,20 +42,23 @@ | |||
154 | 42 | 42 | ||
155 | 43 | import OpenSSL.SSL | 43 | import OpenSSL.SSL |
156 | 44 | 44 | ||
158 | 45 | from zope.interface import implements | 45 | from magicicadaprotocol import ( |
159 | 46 | content_hash, | ||
160 | 47 | errors as protocol_errors, | ||
161 | 48 | protocol_pb2, | ||
162 | 49 | ) | ||
163 | 50 | from magicicadaprotocol.client import ( | ||
164 | 51 | ThrottlingStorageClient, | ||
165 | 52 | ThrottlingStorageClientFactory, | ||
166 | 53 | ) | ||
167 | 54 | from magicicadaprotocol.context import get_ssl_context | ||
168 | 46 | from twisted.internet import reactor, defer, task | 55 | from twisted.internet import reactor, defer, task |
169 | 47 | from twisted.internet import error as twisted_errors | 56 | from twisted.internet import error as twisted_errors |
170 | 48 | from twisted.python.failure import Failure, DefaultException | 57 | from twisted.python.failure import Failure, DefaultException |
171 | 58 | from zope.interface import implements | ||
172 | 49 | 59 | ||
173 | 50 | from ubuntuone import clientdefs | 60 | from ubuntuone import clientdefs |
174 | 51 | from ubuntuone.platform import platform, remove_file | 61 | from ubuntuone.platform import platform, remove_file |
175 | 52 | from ubuntuone.storageprotocol import protocol_pb2, content_hash | ||
176 | 53 | from ubuntuone.storageprotocol import errors as protocol_errors | ||
177 | 54 | from ubuntuone.storageprotocol.client import ( | ||
178 | 55 | ThrottlingStorageClient, | ||
179 | 56 | ThrottlingStorageClientFactory, | ||
180 | 57 | ) | ||
181 | 58 | from ubuntuone.storageprotocol.context import get_ssl_context | ||
182 | 59 | from ubuntuone.syncdaemon.interfaces import IActionQueue, IMarker | 62 | from ubuntuone.syncdaemon.interfaces import IActionQueue, IMarker |
183 | 60 | from ubuntuone.syncdaemon.logger import mklog, TRACE | 63 | from ubuntuone.syncdaemon.logger import mklog, TRACE |
184 | 61 | from ubuntuone.syncdaemon import config, offload_queue | 64 | from ubuntuone.syncdaemon import config, offload_queue |
185 | @@ -884,7 +887,7 @@ | |||
186 | 884 | 887 | ||
187 | 885 | def buildProtocol(self, addr): | 888 | def buildProtocol(self, addr): |
188 | 886 | """Build the client and store it. Connect callbacks.""" | 889 | """Build the client and store it. Connect callbacks.""" |
190 | 887 | # XXX: Very Important Note: within the storageprotocol project, | 890 | # XXX: Very Important Note: within the magicicadaprotocol project, |
191 | 888 | # ThrottlingStorageClient.connectionMade sets self.factory.client | 891 | # ThrottlingStorageClient.connectionMade sets self.factory.client |
192 | 889 | # to self *if* self.factory.client is not None. | 892 | # to self *if* self.factory.client is not None. |
193 | 890 | # Since buildProcotol is called before connectionMade, the latter | 893 | # Since buildProcotol is called before connectionMade, the latter |
194 | 891 | 894 | ||
195 | === modified file 'ubuntuone/syncdaemon/hash_queue.py' | |||
196 | --- ubuntuone/syncdaemon/hash_queue.py 2016-09-17 14:29:53 +0000 | |||
197 | +++ ubuntuone/syncdaemon/hash_queue.py 2018-04-14 23:49:33 +0000 | |||
198 | @@ -1,10 +1,7 @@ | |||
204 | 1 | # ubuntuone.syncdaemon.hash_queue - hash queues | 1 | # -*- coding: utf-8 -*- |
200 | 2 | # | ||
201 | 3 | # Authors: Facundo Batista <facundo@canonical.com> | ||
202 | 4 | # Guillermo Gonzalez <guillermo.gonzalez@canonical.com> | ||
203 | 5 | # Alejandro J. Cura <alecu@canonical.com> | ||
205 | 6 | # | 2 | # |
206 | 7 | # Copyright 2009-2012 Canonical Ltd. | 3 | # Copyright 2009-2012 Canonical Ltd. |
207 | 4 | # Copyright 2015-2018 Chicharreros (https://launchpad.net/~chicharreros) | ||
208 | 8 | # | 5 | # |
209 | 9 | # This program is free software: you can redistribute it and/or modify it | 6 | # This program is free software: you can redistribute it and/or modify it |
210 | 10 | # under the terms of the GNU General Public License version 3, as published | 7 | # under the terms of the GNU General Public License version 3, as published |
211 | @@ -41,11 +38,9 @@ | |||
212 | 41 | 38 | ||
213 | 42 | from collections import OrderedDict | 39 | from collections import OrderedDict |
214 | 43 | 40 | ||
215 | 41 | from magicicadaprotocol.content_hash import content_hash_factory, crc32 | ||
216 | 44 | from twisted.internet import reactor | 42 | from twisted.internet import reactor |
217 | 45 | 43 | ||
218 | 46 | from ubuntuone.storageprotocol.content_hash import \ | ||
219 | 47 | content_hash_factory, crc32 | ||
220 | 48 | |||
221 | 49 | from ubuntuone.platform import ( | 44 | from ubuntuone.platform import ( |
222 | 50 | open_file, | 45 | open_file, |
223 | 51 | stat_path, | 46 | stat_path, |
224 | 52 | 47 | ||
225 | === modified file 'ubuntuone/syncdaemon/interaction_interfaces.py' | |||
226 | --- ubuntuone/syncdaemon/interaction_interfaces.py 2016-09-17 01:06:23 +0000 | |||
227 | +++ ubuntuone/syncdaemon/interaction_interfaces.py 2018-04-14 23:49:33 +0000 | |||
228 | @@ -1,6 +1,7 @@ | |||
229 | 1 | # -*- coding: utf-8 -*- | 1 | # -*- coding: utf-8 -*- |
230 | 2 | # | 2 | # |
231 | 3 | # Copyright 2011-2015 Canonical Ltd. | 3 | # Copyright 2011-2015 Canonical Ltd. |
232 | 4 | # Copyright 2015-2018 Chicharreros (https://launchpad.net/~chicharreros) | ||
233 | 4 | # | 5 | # |
234 | 5 | # This program is free software: you can redistribute it and/or modify it | 6 | # This program is free software: you can redistribute it and/or modify it |
235 | 6 | # under the terms of the GNU General Public License version 3, as published | 7 | # under the terms of the GNU General Public License version 3, as published |
236 | @@ -44,17 +45,14 @@ | |||
237 | 44 | 45 | ||
238 | 45 | from functools import wraps | 46 | from functools import wraps |
239 | 46 | 47 | ||
240 | 48 | from magicicadaprotocol import request | ||
241 | 47 | from twisted.internet import defer | 49 | from twisted.internet import defer |
242 | 48 | 50 | ||
243 | 49 | from ubuntuone.networkstate import NetworkManagerState | 51 | from ubuntuone.networkstate import NetworkManagerState |
248 | 50 | try: | 52 | from ubuntuone.networkstate.networkstates import ONLINE |
245 | 51 | from ubuntuone.networkstate.networkstates import ONLINE | ||
246 | 52 | except ImportError: | ||
247 | 53 | from ubuntuone.networkstate import ONLINE | ||
249 | 54 | 53 | ||
250 | 55 | from ubuntuone.logger import log_call | 54 | from ubuntuone.logger import log_call |
251 | 56 | from ubuntuone.platform import ExternalInterface | 55 | from ubuntuone.platform import ExternalInterface |
252 | 57 | from ubuntuone.storageprotocol import request | ||
253 | 58 | from ubuntuone.syncdaemon import config | 56 | from ubuntuone.syncdaemon import config |
254 | 59 | from ubuntuone.syncdaemon.action_queue import Download, Upload | 57 | from ubuntuone.syncdaemon.action_queue import Download, Upload |
255 | 60 | from ubuntuone.syncdaemon.interfaces import IMarker | 58 | from ubuntuone.syncdaemon.interfaces import IMarker |
256 | 61 | 59 | ||
257 | === modified file 'ubuntuone/syncdaemon/sync.py' | |||
258 | --- ubuntuone/syncdaemon/sync.py 2018-03-09 09:11:05 +0000 | |||
259 | +++ ubuntuone/syncdaemon/sync.py 2018-04-14 23:49:33 +0000 | |||
260 | @@ -1,7 +1,7 @@ | |||
261 | 1 | # -*- coding: utf-8 -*- | 1 | # -*- coding: utf-8 -*- |
262 | 2 | # | 2 | # |
263 | 3 | # Copyright 2009-2012 Canonical Ltd. | 3 | # Copyright 2009-2012 Canonical Ltd. |
265 | 4 | # Copyright 2015-2018 Chicharreros | 4 | # Copyright 2015-2018 Chicharreros (https://launchpad.net/~chicharreros) |
266 | 5 | # | 5 | # |
267 | 6 | # This program is free software: you can redistribute it and/or modify it | 6 | # This program is free software: you can redistribute it and/or modify it |
268 | 7 | # under the terms of the GNU General Public License version 3, as published | 7 | # under the terms of the GNU General Public License version 3, as published |
269 | @@ -31,15 +31,15 @@ | |||
270 | 31 | 31 | ||
271 | 32 | from __future__ import with_statement | 32 | from __future__ import with_statement |
272 | 33 | 33 | ||
273 | 34 | import logging | ||
274 | 34 | import os | 35 | import os |
276 | 35 | import logging | 36 | import sys |
277 | 36 | from operator import attrgetter | 37 | from operator import attrgetter |
279 | 37 | import sys | 38 | |
280 | 39 | from magicicadaprotocol import delta | ||
281 | 38 | 40 | ||
282 | 39 | from ubuntuone.syncdaemon.marker import MDMarker | 41 | from ubuntuone.syncdaemon.marker import MDMarker |
286 | 40 | from ubuntuone.storageprotocol import delta | 42 | from ubuntuone.syncdaemon.fsm.fsm import StateMachineRunner, StateMachine |
284 | 41 | from ubuntuone.syncdaemon.fsm.fsm import \ | ||
285 | 42 | StateMachineRunner, StateMachine | ||
287 | 43 | from ubuntuone.syncdaemon import u1fsfsm | 43 | from ubuntuone.syncdaemon import u1fsfsm |
288 | 44 | from ubuntuone.syncdaemon.logger import DebugCapture | 44 | from ubuntuone.syncdaemon.logger import DebugCapture |
289 | 45 | from ubuntuone.syncdaemon.filesystem_manager import ( | 45 | from ubuntuone.syncdaemon.filesystem_manager import ( |
290 | 46 | 46 | ||
291 | === modified file 'ubuntuone/syncdaemon/tests/test_action_queue.py' | |||
292 | --- ubuntuone/syncdaemon/tests/test_action_queue.py 2018-03-14 21:01:56 +0000 | |||
293 | +++ ubuntuone/syncdaemon/tests/test_action_queue.py 2018-04-14 23:49:33 +0000 | |||
294 | @@ -45,6 +45,13 @@ | |||
295 | 45 | 45 | ||
296 | 46 | import OpenSSL.SSL | 46 | import OpenSSL.SSL |
297 | 47 | 47 | ||
298 | 48 | from magicicadaprotocol import ( | ||
299 | 49 | client, | ||
300 | 50 | content_hash, | ||
301 | 51 | errors, | ||
302 | 52 | protocol_pb2, | ||
303 | 53 | request, | ||
304 | 54 | ) | ||
305 | 48 | from mocker import Mocker, MockerTestCase, ANY, expect | 55 | from mocker import Mocker, MockerTestCase, ANY, expect |
306 | 49 | from twisted.internet import defer, reactor | 56 | from twisted.internet import defer, reactor |
307 | 50 | from twisted.internet import error as twisted_error | 57 | from twisted.internet import error as twisted_error |
308 | @@ -65,13 +72,6 @@ | |||
309 | 65 | from ubuntuone.devtools.testcases import skipTest | 72 | from ubuntuone.devtools.testcases import skipTest |
310 | 66 | from ubuntuone import logger, clientdefs | 73 | from ubuntuone import logger, clientdefs |
311 | 67 | from ubuntuone.platform import open_file, platform, path_exists | 74 | from ubuntuone.platform import open_file, platform, path_exists |
312 | 68 | from ubuntuone.storageprotocol import ( | ||
313 | 69 | client, | ||
314 | 70 | content_hash, | ||
315 | 71 | errors, | ||
316 | 72 | protocol_pb2, | ||
317 | 73 | request, | ||
318 | 74 | ) | ||
319 | 75 | from ubuntuone.syncdaemon import interfaces, config | 75 | from ubuntuone.syncdaemon import interfaces, config |
320 | 76 | from ubuntuone.syncdaemon import action_queue | 76 | from ubuntuone.syncdaemon import action_queue |
321 | 77 | from ubuntuone.syncdaemon.action_queue import ( | 77 | from ubuntuone.syncdaemon.action_queue import ( |
322 | 78 | 78 | ||
323 | === modified file 'ubuntuone/syncdaemon/tests/test_hashqueue.py' | |||
324 | --- ubuntuone/syncdaemon/tests/test_hashqueue.py 2016-09-17 14:29:53 +0000 | |||
325 | +++ ubuntuone/syncdaemon/tests/test_hashqueue.py 2018-04-14 23:49:33 +0000 | |||
326 | @@ -1,8 +1,7 @@ | |||
330 | 1 | # | 1 | # -*- coding: utf-8 -*- |
328 | 2 | # Authors: Facundo Batista <facundo@canonical.com> | ||
329 | 3 | # Alejandro J. Cura <alecu@canonical.com> | ||
331 | 4 | # | 2 | # |
332 | 5 | # Copyright 2009-2012 Canonical Ltd. | 3 | # Copyright 2009-2012 Canonical Ltd. |
333 | 4 | # Copyright 2015-2018 Chicharreros (https://launchpad.net/~chicharreros) | ||
334 | 6 | # | 5 | # |
335 | 7 | # This program is free software: you can redistribute it and/or modify it | 6 | # This program is free software: you can redistribute it and/or modify it |
336 | 8 | # under the terms of the GNU General Public License version 3, as published | 7 | # under the terms of the GNU General Public License version 3, as published |
337 | @@ -32,13 +31,14 @@ | |||
338 | 32 | 31 | ||
339 | 33 | from __future__ import with_statement | 32 | from __future__ import with_statement |
340 | 34 | 33 | ||
341 | 34 | import logging | ||
342 | 35 | import os | 35 | import os |
343 | 36 | import random | 36 | import random |
344 | 37 | import threading | ||
345 | 37 | import time | 38 | import time |
346 | 38 | import logging | ||
347 | 39 | import threading | ||
348 | 40 | |||
349 | 41 | from StringIO import StringIO | 39 | from StringIO import StringIO |
350 | 40 | |||
351 | 41 | from magicicadaprotocol.content_hash import content_hash_factory, crc32 | ||
352 | 42 | from twisted.trial.unittest import TestCase as TwistedTestCase | 42 | from twisted.trial.unittest import TestCase as TwistedTestCase |
353 | 43 | from twisted.internet import defer, reactor | 43 | from twisted.internet import defer, reactor |
354 | 44 | from ubuntuone.devtools.handlers import MementoHandler | 44 | from ubuntuone.devtools.handlers import MementoHandler |
355 | @@ -48,7 +48,6 @@ | |||
356 | 48 | from ubuntuone.platform import open_file, stat_path | 48 | from ubuntuone.platform import open_file, stat_path |
357 | 49 | from ubuntuone.syncdaemon import hash_queue | 49 | from ubuntuone.syncdaemon import hash_queue |
358 | 50 | from ubuntuone.syncdaemon.hash_queue import HASHQUEUE_DELAY | 50 | from ubuntuone.syncdaemon.hash_queue import HASHQUEUE_DELAY |
359 | 51 | from ubuntuone.storageprotocol.content_hash import content_hash_factory, crc32 | ||
360 | 52 | 51 | ||
361 | 53 | FAKE_TIMESTAMP = 1 | 52 | FAKE_TIMESTAMP = 1 |
362 | 54 | 53 | ||
363 | 55 | 54 | ||
364 | === modified file 'ubuntuone/syncdaemon/tests/test_interaction_interfaces.py' | |||
365 | --- ubuntuone/syncdaemon/tests/test_interaction_interfaces.py 2016-09-17 01:06:23 +0000 | |||
366 | +++ ubuntuone/syncdaemon/tests/test_interaction_interfaces.py 2018-04-14 23:49:33 +0000 | |||
367 | @@ -1,6 +1,7 @@ | |||
368 | 1 | # -*- coding: utf-8 -*- | 1 | # -*- coding: utf-8 -*- |
369 | 2 | # | 2 | # |
370 | 3 | # Copyright 2011-2015 Canonical Ltd. | 3 | # Copyright 2011-2015 Canonical Ltd. |
371 | 4 | # Copyright 2015-2018 Chicharreros (https://launchpad.net/~chicharreros) | ||
372 | 4 | # | 5 | # |
373 | 5 | # This program is free software: you can redistribute it and/or modify it | 6 | # This program is free software: you can redistribute it and/or modify it |
374 | 6 | # under the terms of the GNU General Public License version 3, as published | 7 | # under the terms of the GNU General Public License version 3, as published |
375 | @@ -31,15 +32,9 @@ | |||
376 | 31 | import logging | 32 | import logging |
377 | 32 | import os | 33 | import os |
378 | 33 | 34 | ||
379 | 35 | from magicicadaprotocol.protocol_pb2 import AccountInfo | ||
380 | 34 | from twisted.internet import defer | 36 | from twisted.internet import defer |
381 | 35 | from ubuntuone.devtools.handlers import MementoHandler | 37 | from ubuntuone.devtools.handlers import MementoHandler |
382 | 36 | try: | ||
383 | 37 | from ubuntuone.networkstate.networkstates import ONLINE | ||
384 | 38 | except ImportError: | ||
385 | 39 | from ubuntuone.networkstate import ONLINE | ||
386 | 40 | from ubuntuone.platform.tests.ipc.test_perspective_broker import ( | ||
387 | 41 | FakeNetworkManagerState, | ||
388 | 42 | ) | ||
389 | 43 | 38 | ||
390 | 44 | from contrib.testing.testcase import ( | 39 | from contrib.testing.testcase import ( |
391 | 45 | FAKED_CREDENTIALS, | 40 | FAKED_CREDENTIALS, |
392 | @@ -50,8 +45,11 @@ | |||
393 | 50 | FakeMainTestCase, | 45 | FakeMainTestCase, |
394 | 51 | skipIfOS, | 46 | skipIfOS, |
395 | 52 | ) | 47 | ) |
396 | 48 | from ubuntuone.networkstate.networkstates import ONLINE | ||
397 | 53 | from ubuntuone.platform import make_dir, make_link | 49 | from ubuntuone.platform import make_dir, make_link |
399 | 54 | from ubuntuone.storageprotocol.protocol_pb2 import AccountInfo | 50 | from ubuntuone.platform.tests.ipc.test_perspective_broker import ( |
400 | 51 | FakeNetworkManagerState, | ||
401 | 52 | ) | ||
402 | 55 | from ubuntuone.syncdaemon import ( | 53 | from ubuntuone.syncdaemon import ( |
403 | 56 | config, | 54 | config, |
404 | 57 | interaction_interfaces, | 55 | interaction_interfaces, |
405 | 58 | 56 | ||
406 | === modified file 'ubuntuone/syncdaemon/tests/test_localrescan.py' | |||
407 | --- ubuntuone/syncdaemon/tests/test_localrescan.py 2018-03-08 19:39:13 +0000 | |||
408 | +++ ubuntuone/syncdaemon/tests/test_localrescan.py 2018-04-14 23:49:33 +0000 | |||
409 | @@ -1,6 +1,7 @@ | |||
410 | 1 | # -*- coding: utf-8 -*- | 1 | # -*- coding: utf-8 -*- |
411 | 2 | # | 2 | # |
412 | 3 | # Copyright 2009-2012 Canonical Ltd. | 3 | # Copyright 2009-2012 Canonical Ltd. |
413 | 4 | # Copyright 2015-2018 Chicharreros (https://launchpad.net/~chicharreros) | ||
414 | 4 | # | 5 | # |
415 | 5 | # This program is free software: you can redistribute it and/or modify it | 6 | # This program is free software: you can redistribute it and/or modify it |
416 | 6 | # under the terms of the GNU General Public License version 3, as published | 7 | # under the terms of the GNU General Public License version 3, as published |
417 | @@ -34,6 +35,7 @@ | |||
418 | 34 | import os | 35 | import os |
419 | 35 | import uuid | 36 | import uuid |
420 | 36 | 37 | ||
421 | 38 | from magicicadaprotocol import content_hash as storage_hash, volumes | ||
422 | 37 | from twisted.internet import defer, reactor | 39 | from twisted.internet import defer, reactor |
423 | 38 | from ubuntuone.devtools.handlers import MementoHandler | 40 | from ubuntuone.devtools.handlers import MementoHandler |
424 | 39 | from ubuntuone.devtools.testcases import skipIfOS | 41 | from ubuntuone.devtools.testcases import skipIfOS |
425 | @@ -62,9 +64,6 @@ | |||
426 | 62 | ) | 64 | ) |
427 | 63 | from ubuntuone.syncdaemon.marker import MDMarker | 65 | from ubuntuone.syncdaemon.marker import MDMarker |
428 | 64 | from ubuntuone.syncdaemon.tritcask import Tritcask | 66 | from ubuntuone.syncdaemon.tritcask import Tritcask |
429 | 65 | from ubuntuone.storageprotocol import ( | ||
430 | 66 | content_hash as storage_hash, volumes | ||
431 | 67 | ) | ||
432 | 68 | from ubuntuone.syncdaemon.volume_manager import ( | 67 | from ubuntuone.syncdaemon.volume_manager import ( |
433 | 69 | ACCESS_LEVEL_RO, | 68 | ACCESS_LEVEL_RO, |
434 | 70 | ACCESS_LEVEL_RW, | 69 | ACCESS_LEVEL_RW, |
435 | 71 | 70 | ||
436 | === modified file 'ubuntuone/syncdaemon/tests/test_sync.py' | |||
437 | --- ubuntuone/syncdaemon/tests/test_sync.py 2018-03-09 09:11:05 +0000 | |||
438 | +++ ubuntuone/syncdaemon/tests/test_sync.py 2018-04-14 23:49:33 +0000 | |||
439 | @@ -1,7 +1,7 @@ | |||
440 | 1 | # -*- coding: utf-8 -*- | 1 | # -*- coding: utf-8 -*- |
441 | 2 | # | 2 | # |
442 | 3 | # Copyright 2009-2012 Canonical Ltd. | 3 | # Copyright 2009-2012 Canonical Ltd. |
444 | 4 | # Copyright 2015-2018 Chicharreros | 4 | # Copyright 2015-2018 Chicharreros (https://launchpad.net/~chicharreros) |
445 | 5 | # | 5 | # |
446 | 6 | # This program is free software: you can redistribute it and/or modify it | 6 | # This program is free software: you can redistribute it and/or modify it |
447 | 7 | # under the terms of the GNU General Public License version 3, as published | 7 | # under the terms of the GNU General Public License version 3, as published |
448 | @@ -39,8 +39,11 @@ | |||
449 | 39 | import unittest | 39 | import unittest |
450 | 40 | import uuid | 40 | import uuid |
451 | 41 | 41 | ||
452 | 42 | from magicicadaprotocol import delta | ||
453 | 43 | from magicicadaprotocol.request import ROOT | ||
454 | 42 | from twisted.internet import defer | 44 | from twisted.internet import defer |
455 | 43 | from twisted.python.failure import Failure | 45 | from twisted.python.failure import Failure |
456 | 46 | from ubuntuone.devtools.handlers import MementoHandler | ||
457 | 44 | from ubuntuone.devtools.testcases import skipIfOS | 47 | from ubuntuone.devtools.testcases import skipIfOS |
458 | 45 | 48 | ||
459 | 46 | from contrib.testing.testcase import ( | 49 | from contrib.testing.testcase import ( |
460 | @@ -49,8 +52,6 @@ | |||
461 | 49 | BaseTwistedTestCase, | 52 | BaseTwistedTestCase, |
462 | 50 | Listener, | 53 | Listener, |
463 | 51 | ) | 54 | ) |
464 | 52 | |||
465 | 53 | from ubuntuone.devtools.handlers import MementoHandler | ||
466 | 54 | from ubuntuone.platform import ( | 55 | from ubuntuone.platform import ( |
467 | 55 | make_dir, | 56 | make_dir, |
468 | 56 | open_file, | 57 | open_file, |
469 | @@ -63,8 +64,6 @@ | |||
470 | 63 | from ubuntuone.syncdaemon.sync import FSKey, Sync, SyncStateMachineRunner | 64 | from ubuntuone.syncdaemon.sync import FSKey, Sync, SyncStateMachineRunner |
471 | 64 | from ubuntuone.syncdaemon.volume_manager import Share | 65 | from ubuntuone.syncdaemon.volume_manager import Share |
472 | 65 | from ubuntuone.syncdaemon.event_queue import EventQueue, EVENTS | 66 | from ubuntuone.syncdaemon.event_queue import EventQueue, EVENTS |
473 | 66 | from ubuntuone.storageprotocol.request import ROOT | ||
474 | 67 | from ubuntuone.storageprotocol import delta | ||
475 | 68 | from ubuntuone.syncdaemon.marker import MDMarker | 67 | from ubuntuone.syncdaemon.marker import MDMarker |
476 | 69 | 68 | ||
477 | 70 | 69 | ||
478 | 71 | 70 | ||
479 | === modified file 'ubuntuone/syncdaemon/tests/test_vm.py' | |||
480 | --- ubuntuone/syncdaemon/tests/test_vm.py 2016-06-04 21:14:35 +0000 | |||
481 | +++ ubuntuone/syncdaemon/tests/test_vm.py 2018-04-14 23:49:33 +0000 | |||
482 | @@ -1,8 +1,7 @@ | |||
483 | 1 | # -*- coding: utf-8 -*- | 1 | # -*- coding: utf-8 -*- |
484 | 2 | # | 2 | # |
485 | 3 | # Author: Guillermo Gonzalez <guillermo.gonzalez@canonical.com> | ||
486 | 4 | # | ||
487 | 5 | # Copyright 2009-2012 Canonical Ltd. | 3 | # Copyright 2009-2012 Canonical Ltd. |
488 | 4 | # Copyright 2015-2018 Chicharreros (https://launchpad.net/~chicharreros) | ||
489 | 6 | # | 5 | # |
490 | 7 | # This program is free software: you can redistribute it and/or modify it | 6 | # This program is free software: you can redistribute it and/or modify it |
491 | 8 | # under the terms of the GNU General Public License version 3, as published | 7 | # under the terms of the GNU General Public License version 3, as published |
492 | @@ -40,16 +39,14 @@ | |||
493 | 40 | import sys | 39 | import sys |
494 | 41 | import uuid | 40 | import uuid |
495 | 42 | 41 | ||
496 | 42 | from magicicadaprotocol import volumes, request | ||
497 | 43 | from magicicadaprotocol.client import ListShares | ||
498 | 44 | from magicicadaprotocol.sharersp import NotifyShareHolder, ShareResponse | ||
499 | 45 | |||
500 | 43 | from mocker import Mocker, MATCH | 46 | from mocker import Mocker, MATCH |
501 | 44 | from twisted.internet import defer, reactor | 47 | from twisted.internet import defer, reactor |
502 | 45 | from ubuntuone.devtools.handlers import MementoHandler | 48 | from ubuntuone.devtools.handlers import MementoHandler |
503 | 46 | from ubuntuone.devtools.testcases import skipIfOS | 49 | from ubuntuone.devtools.testcases import skipIfOS |
504 | 47 | from ubuntuone.storageprotocol import volumes, request | ||
505 | 48 | from ubuntuone.storageprotocol.client import ListShares | ||
506 | 49 | from ubuntuone.storageprotocol.sharersp import ( | ||
507 | 50 | NotifyShareHolder, | ||
508 | 51 | ShareResponse, | ||
509 | 52 | ) | ||
510 | 53 | 50 | ||
511 | 54 | from contrib.testing.testcase import ( | 51 | from contrib.testing.testcase import ( |
512 | 55 | BaseTwistedTestCase, | 52 | BaseTwistedTestCase, |
513 | 56 | 53 | ||
514 | === modified file 'ubuntuone/syncdaemon/volume_manager.py' | |||
515 | --- ubuntuone/syncdaemon/volume_manager.py 2016-06-01 21:38:23 +0000 | |||
516 | +++ ubuntuone/syncdaemon/volume_manager.py 2018-04-14 23:49:33 +0000 | |||
517 | @@ -1,6 +1,7 @@ | |||
519 | 1 | # ubuntuone.syncdaemon.volume_manager - manages volumes | 1 | # -*- coding: utf-8 -*- |
520 | 2 | # | 2 | # |
521 | 3 | # Copyright 2009-2012 Canonical Ltd. | 3 | # Copyright 2009-2012 Canonical Ltd. |
522 | 4 | # Copyright 2015-2018 Chicharreros (https://launchpad.net/~chicharreros) | ||
523 | 4 | # | 5 | # |
524 | 5 | # This program is free software: you can redistribute it and/or modify it | 6 | # This program is free software: you can redistribute it and/or modify it |
525 | 6 | # under the terms of the GNU General Public License version 3, as published | 7 | # under the terms of the GNU General Public License version 3, as published |
526 | @@ -41,14 +42,14 @@ | |||
527 | 41 | 42 | ||
528 | 42 | from itertools import ifilter | 43 | from itertools import ifilter |
529 | 43 | 44 | ||
534 | 44 | from twisted.internet import defer | 45 | from magicicadaprotocol import request |
535 | 45 | from ubuntuone.platform import expand_user | 46 | from magicicadaprotocol.volumes import ( |
532 | 46 | from ubuntuone.storageprotocol import request | ||
533 | 47 | from ubuntuone.storageprotocol.volumes import ( | ||
536 | 48 | ShareVolume, | 47 | ShareVolume, |
537 | 49 | UDFVolume, | 48 | UDFVolume, |
538 | 50 | RootVolume, | 49 | RootVolume, |
539 | 51 | ) | 50 | ) |
540 | 51 | from twisted.internet import defer | ||
541 | 52 | from ubuntuone.platform import expand_user | ||
542 | 52 | 53 | ||
543 | 53 | from ubuntuone.syncdaemon.marker import MDMarker | 54 | from ubuntuone.syncdaemon.marker import MDMarker |
544 | 54 | from ubuntuone.syncdaemon.interfaces import IMarker | 55 | from ubuntuone.syncdaemon.interfaces import IMarker |
Rock!