Merge lp:~mterry/deja-dup/drop-u1 into lp:deja-dup/30
- drop-u1
- Merge into 30
Proposed by
Michael Terry
Status: | Merged |
---|---|
Merge reported by: | Michael Terry |
Merged at revision: | not available |
Proposed branch: | lp:~mterry/deja-dup/drop-u1 |
Merge into: | lp:deja-dup/30 |
Diff against target: |
559 lines (+36/-325) 11 files modified
data/org.gnome.DejaDup.gschema.xml.in (+0/-8) debian/control (+2/-18) deja-dup/MountOperationAssistant.vala (+1/-1) deja-dup/deja-dup.appdata.xml.in (+1/-1) deja-dup/widgets/ConfigLabelLocation.vala (+0/-2) deja-dup/widgets/ConfigLocation.vala (+7/-5) deja-dup/widgets/ConfigLocationU1.vala (+4/-3) libdeja/BackendAuto.vala (+6/-15) libdeja/BackendU1.vala (+3/-265) libdeja/tests/runner.vala (+7/-7) libdeja/tests/scripts/u1.test (+5/-0) |
To merge this branch: | bzr merge lp:~mterry/deja-dup/drop-u1 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Robert Bruce Park (community) | Approve | ||
Déjà Dup Developers | Pending | ||
Review via email: mp+213904@code.launchpad.net |
Commit message
Description of the change
Drop support for Ubuntu One.
Now that Ubuntu One is going away, we shouldn't act like it's available for users. This branch removes it from the UI, unless the user is already configured for it. Then, we continue to show it, but with a warning message in the preference dialog and an error when the user tries to back up or restore.
To post a comment you must log in.
lp:~mterry/deja-dup/drop-u1
updated
- 1536. By Michael Terry
-
Drop ubuntuone backend package
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'data/org.gnome.DejaDup.gschema.xml.in' |
2 | --- data/org.gnome.DejaDup.gschema.xml.in 2013-10-15 04:36:06 +0000 |
3 | +++ data/org.gnome.DejaDup.gschema.xml.in 2014-04-02 18:47:53 +0000 |
4 | @@ -75,7 +75,6 @@ |
5 | </key> |
6 | <child name="rackspace" schema="org.gnome.DejaDup.Rackspace"/> |
7 | <child name="s3" schema="org.gnome.DejaDup.S3"/> |
8 | - <child name="u1" schema="org.gnome.DejaDup.U1"/> |
9 | <child name="file" schema="org.gnome.DejaDup.File"/> |
10 | </schema> |
11 | <schema id="org.gnome.DejaDup.S3" path="/org/gnome/deja-dup/s3/"> |
12 | @@ -107,13 +106,6 @@ |
13 | <_description>This is your username for the Rackspace Cloud Files service.</_description> |
14 | </key> |
15 | </schema> |
16 | - <schema id="org.gnome.DejaDup.U1" path="/org/gnome/deja-dup/u1/"> |
17 | - <key name="folder" type="s"> |
18 | - <default>'/deja-dup/$HOSTNAME'</default> |
19 | - <_summary>The Ubuntu One folder</_summary> |
20 | - <_description>The folder name to store files in. If ‘$HOSTNAME’, it will default to a folder based on the name of the computer.</_description> |
21 | - </key> |
22 | - </schema> |
23 | <schema id="org.gnome.DejaDup.File" path="/org/gnome/deja-dup/file/"> |
24 | <key name="path" type="s"> |
25 | <default>''</default> |
26 | |
27 | === modified file 'debian/control' |
28 | --- debian/control 2014-01-24 16:07:59 +0000 |
29 | +++ debian/control 2014-04-02 18:47:53 +0000 |
30 | @@ -36,15 +36,14 @@ |
31 | policykit-1, |
32 | Suggests: deja-dup-backend-cloudfiles, |
33 | deja-dup-backend-s3, |
34 | - deja-dup-backend-ubuntuone, |
35 | Description: Back up your files |
36 | Déjà Dup is a simple backup tool. It hides the complexity of backing up the |
37 | Right Way (encrypted, off-site, and regular) and uses duplicity as the |
38 | backend. |
39 | . |
40 | Features: |
41 | - * Support for local, remote, or cloud backup locations, such as Amazon S3, |
42 | - Rackspace Cloud Files, and Ubuntu One |
43 | + * Support for local, remote, or cloud backup locations, such as Amazon S3 and |
44 | + Rackspace Cloud Files |
45 | * Securely encrypts and compresses your data |
46 | * Incrementally backs up, letting you restore from any particular backup |
47 | * Schedules regular backups |
48 | @@ -85,18 +84,3 @@ |
49 | backend. |
50 | . |
51 | This package adds Amazon S3 support to Déjà Dup. |
52 | - |
53 | -Package: deja-dup-backend-ubuntuone |
54 | -Architecture: all |
55 | -Depends: ${misc:Depends}, |
56 | - deja-dup, |
57 | - python-httplib2, |
58 | - python-oauthlib, |
59 | - ubuntuone-client, |
60 | - ubuntuone-control-panel, |
61 | -Description: Ubuntu One support for Déjà Dup |
62 | - Déjà Dup is a simple backup tool. It hides the complexity of backing up the |
63 | - Right Way (encrypted, off-site, and regular) and uses duplicity as the |
64 | - backend. |
65 | - . |
66 | - This package adds Ubuntu One support to Déjà Dup. |
67 | |
68 | === modified file 'deja-dup/MountOperationAssistant.vala' |
69 | --- deja-dup/MountOperationAssistant.vala 2013-10-18 18:36:51 +0000 |
70 | +++ deja-dup/MountOperationAssistant.vala 2014-04-02 18:47:53 +0000 |
71 | @@ -26,7 +26,7 @@ |
72 | * 2) Or by driving the authentication themselves in some secret way. If so, |
73 | * they will ask for a button to be shown to start the authentication. |
74 | * When they are done, they will set the 'go_forward' property to true. |
75 | - * This is used by the U1 backend. |
76 | + * This was used by the U1 backend. |
77 | */ |
78 | |
79 | public class MountOperationAssistant : MountOperation |
80 | |
81 | === modified file 'deja-dup/deja-dup.appdata.xml.in' |
82 | --- deja-dup/deja-dup.appdata.xml.in 2013-11-08 03:25:36 +0000 |
83 | +++ deja-dup/deja-dup.appdata.xml.in 2014-04-02 18:47:53 +0000 |
84 | @@ -7,7 +7,7 @@ |
85 | <description> |
86 | <_p>Déjà Dup is a simple backup tool. It hides the complexity of backing up the Right Way (encrypted, off-site, and regular) and uses duplicity as the backend.</_p> |
87 | <ul> |
88 | - <_li>Support for local, remote, or cloud backup locations, such as Amazon S3, Rackspace Cloud Files, and Ubuntu One</_li> |
89 | + <_li>Support for local, remote, or cloud backup locations, such as Amazon S3 and Rackspace Cloud Files</_li> |
90 | <_li>Securely encrypts and compresses your data</_li> |
91 | <_li>Incrementally backs up, letting you restore from any particular backup</_li> |
92 | <_li>Schedules regular backups</_li> |
93 | |
94 | === modified file 'deja-dup/widgets/ConfigLabelLocation.vala' |
95 | --- deja-dup/widgets/ConfigLabelLocation.vala 2013-01-27 20:30:52 +0000 |
96 | +++ deja-dup/widgets/ConfigLabelLocation.vala 2014-04-02 18:47:53 +0000 |
97 | @@ -26,7 +26,6 @@ |
98 | Gtk.Image img; |
99 | FilteredSettings file_root; |
100 | FilteredSettings s3_root; |
101 | - FilteredSettings u1_root; |
102 | FilteredSettings rackspace_root; |
103 | |
104 | public ConfigLabelLocation() |
105 | @@ -40,7 +39,6 @@ |
106 | watch_key(BACKEND_KEY); |
107 | watch_key(null, (file_root = DejaDup.get_settings(FILE_ROOT))); |
108 | watch_key(null, (s3_root = DejaDup.get_settings(S3_ROOT))); |
109 | - watch_key(null, (u1_root = DejaDup.get_settings(U1_ROOT))); |
110 | watch_key(null, (rackspace_root = DejaDup.get_settings(RACKSPACE_ROOT))); |
111 | set_from_config.begin(); |
112 | } |
113 | |
114 | === modified file 'deja-dup/widgets/ConfigLocation.vala' |
115 | --- deja-dup/widgets/ConfigLocation.vala 2013-10-19 17:43:57 +0000 |
116 | +++ deja-dup/widgets/ConfigLocation.vala 2014-04-02 18:47:53 +0000 |
117 | @@ -179,7 +179,9 @@ |
118 | } |
119 | |
120 | void insert_u1() { |
121 | - insert_cloud_if_available("u1", BackendU1.get_checker(), |
122 | + // No longer functional. |
123 | + // Only shown if user already had it configured, for migration purposes. |
124 | + insert_cloud_if_available("u1", null, |
125 | new ThemedIcon.from_names({"ubuntuone", |
126 | "ubuntuone-installer", |
127 | "deja-dup-cloud"}), |
128 | @@ -196,18 +198,18 @@ |
129 | ref index_rackspace, insert_rackspace); |
130 | } |
131 | |
132 | - void insert_cloud_if_available(string id, Checker checker, |
133 | + void insert_cloud_if_available(string id, Checker? checker, |
134 | Icon icon, string name, |
135 | - Gtk.Widget w, ref int index, |
136 | + Gtk.Widget? w, ref int index, |
137 | CloudCallback cb) |
138 | { |
139 | var backend = Backend.get_default_type(); |
140 | - if (backend == id || (checker.complete && checker.available)) { |
141 | + if (backend == id || (checker != null && checker.complete && checker.available)) { |
142 | index = add_entry(icon, name, Group.CLOUD, w); |
143 | if (index_cloud_sep == -2) |
144 | index_cloud_sep = add_separator(Group.CLOUD_SEP); |
145 | } |
146 | - else if (!checker.complete) { |
147 | + else if (checker != null && !checker.complete) { |
148 | // Call ourselves when we've got enough information. Also make sure to |
149 | // set from config again, in case in a previous set_from_config, we |
150 | // weren't available in the combo yet. |
151 | |
152 | === modified file 'deja-dup/widgets/ConfigLocationU1.vala' |
153 | --- deja-dup/widgets/ConfigLocationU1.vala 2012-03-17 04:02:46 +0000 |
154 | +++ deja-dup/widgets/ConfigLocationU1.vala 2014-04-02 18:47:53 +0000 |
155 | @@ -28,9 +28,10 @@ |
156 | } |
157 | |
158 | construct { |
159 | - var entry = new ConfigFolder(DejaDup.U1_FOLDER_KEY, DejaDup.U1_ROOT); |
160 | - entry.set_accessible_name("U1Folder"); |
161 | - add_widget(_("_Folder"), entry); |
162 | + var label = new Gtk.Label(""); |
163 | + label.set_markup("<b><big>%s</big></b>".printf(_("Ubuntu One has shut down. Please choose another storage location."))); |
164 | + label.margin_top = 20; |
165 | + add_wide_widget(label); |
166 | } |
167 | } |
168 | |
169 | |
170 | === modified file 'libdeja/BackendAuto.vala' |
171 | --- libdeja/BackendAuto.vala 2012-03-21 03:01:36 +0000 |
172 | +++ libdeja/BackendAuto.vala 2014-04-02 18:47:53 +0000 |
173 | @@ -50,7 +50,6 @@ |
174 | |
175 | static bool started = false; |
176 | static bool done = false; |
177 | - Checker u1checker; |
178 | Checker s3checker; |
179 | construct { |
180 | if (!started) { |
181 | @@ -59,10 +58,7 @@ |
182 | started = true; |
183 | ref(); // Give us time to finish |
184 | |
185 | - // List is (in order): u1, s3, file |
186 | - u1checker = BackendU1.get_checker(); |
187 | - u1checker.notify["complete"].connect(examine_checkers); |
188 | - |
189 | + // List is (in order): s3, file |
190 | s3checker = BackendS3.get_checker(); |
191 | s3checker.notify["complete"].connect(examine_checkers); |
192 | |
193 | @@ -75,16 +71,11 @@ |
194 | if (done) |
195 | return; |
196 | |
197 | - if (u1checker.complete) { |
198 | - if (u1checker.available) { |
199 | - finish("u1"); |
200 | - } |
201 | - else if (s3checker.complete) { |
202 | - if (s3checker.available) |
203 | - finish("s3"); |
204 | - else |
205 | - finish("file"); |
206 | - } |
207 | + if (s3checker.complete) { |
208 | + if (s3checker.available) |
209 | + finish("s3"); |
210 | + else |
211 | + finish("file"); |
212 | } |
213 | } |
214 | |
215 | |
216 | === modified file 'libdeja/BackendU1.vala' |
217 | --- libdeja/BackendU1.vala 2012-11-05 15:17:28 +0000 |
218 | +++ libdeja/BackendU1.vala 2014-04-02 18:47:53 +0000 |
219 | @@ -21,295 +21,33 @@ |
220 | |
221 | namespace DejaDup { |
222 | |
223 | -public const string U1_ROOT = "U1"; |
224 | -public const string U1_FOLDER_KEY = "folder"; |
225 | - |
226 | -class Listener : Object |
227 | -{ |
228 | - public delegate void Handler(string name, Variant args); |
229 | - public DBusProxy proxy {get; construct;} |
230 | - public string method {get; construct;} |
231 | - public Variant args {get; construct;} |
232 | - public unowned Handler handler {get; set;} |
233 | - |
234 | - public Listener(DBusProxy proxy, string method, Variant? args, Handler handler) |
235 | - { |
236 | - Object(proxy: proxy, method: method, args: args); |
237 | - this.handler = handler; |
238 | - } |
239 | - |
240 | - MainLoop loop; |
241 | - construct { |
242 | - loop = new MainLoop(null, false); |
243 | - } |
244 | - |
245 | - public void run() |
246 | - { |
247 | - Idle.add(() => { |
248 | - call_but_quit_on_fail.begin(); |
249 | - return false; |
250 | - }); |
251 | - proxy.g_signal.connect(handle_dbus_signal); |
252 | - loop.run(); |
253 | - proxy.g_signal.disconnect(handle_dbus_signal); |
254 | - } |
255 | - |
256 | - async void call_but_quit_on_fail() |
257 | - { |
258 | - try { |
259 | - yield proxy.call(method, args, DBusCallFlags.NONE, -1, null); |
260 | - } |
261 | - catch (Error e) { |
262 | - warning("%s\n", e.message); |
263 | - loop.quit(); |
264 | - } |
265 | - } |
266 | - |
267 | - void handle_dbus_signal(DBusProxy obj, string? sender, string name, Variant args) |
268 | - { |
269 | - // Stop on first signal |
270 | - handler(name, args); |
271 | - loop.quit(); |
272 | - } |
273 | -} |
274 | - |
275 | -class U1Checker : Checker |
276 | -{ |
277 | - PythonChecker pyu1; |
278 | - construct { |
279 | - try { |
280 | - var proxy = BackendU1.get_creds_proxy(); |
281 | - if (proxy.get_name_owner() == null) { |
282 | - available = false; |
283 | - complete = true; |
284 | - } |
285 | - } |
286 | - catch (Error e) { |
287 | - warning("%s\n", e.message); |
288 | - available = false; |
289 | - complete = true; |
290 | - } |
291 | - |
292 | - if (!complete) { |
293 | - // A bit of abstraction leakage here; we have to keep these imports in |
294 | - // line with what duplicity uses. Maybe we should add to duplicity a way |
295 | - // to ask 'can I use this backend?' |
296 | - pyu1 = PythonChecker.get_checker("oauthlib, httplib2"); |
297 | - if (pyu1.complete) { |
298 | - available = pyu1.available; |
299 | - complete = pyu1.complete; |
300 | - } |
301 | - else { |
302 | - pyu1.notify["complete"].connect(() => { |
303 | - available = pyu1.available; |
304 | - complete = pyu1.complete; |
305 | - pyu1 = null; |
306 | - }); |
307 | - } |
308 | - } |
309 | - } |
310 | -} |
311 | - |
312 | public class BackendU1 : Backend |
313 | { |
314 | - ulong button_handler = 0; |
315 | - |
316 | - static Checker checker_instance = null; |
317 | - public static Checker get_checker() |
318 | - { |
319 | - if (checker_instance == null) |
320 | - checker_instance = new U1Checker(); |
321 | - return checker_instance; |
322 | - } |
323 | - |
324 | public override Backend clone() { |
325 | return new BackendU1(); |
326 | } |
327 | |
328 | - ~BackendU1() |
329 | - { |
330 | - if (button_handler > 0) { |
331 | - mount_op.disconnect(button_handler); |
332 | - button_handler = 0; |
333 | - } |
334 | - } |
335 | - |
336 | public override bool is_native() { |
337 | return false; |
338 | } |
339 | |
340 | - public override bool space_can_be_infinite() { |
341 | - return false; |
342 | - } |
343 | - |
344 | public override Icon? get_icon() { |
345 | return new ThemedIcon.from_names({"ubuntuone", "ubuntuone-installer", "deja-dup-cloud"}); |
346 | } |
347 | |
348 | - public override async bool is_ready(out string when) { |
349 | - when = _("Backup will begin when a network connection becomes available."); |
350 | - return yield Network.get().can_reach ("https://one.ubuntu.com/"); |
351 | - } |
352 | - |
353 | public override string get_location(ref bool as_root) |
354 | { |
355 | - // The UI backend for duplicity needs to talk to our session dbus, but it |
356 | - // can't as root. |
357 | - as_root = false; |
358 | - |
359 | - var settings = get_settings(U1_ROOT); |
360 | - var folder = get_folder_key(settings, U1_FOLDER_KEY); |
361 | - return "u1+http://%s".printf(folder); |
362 | + return ""; |
363 | } |
364 | |
365 | public override string get_location_pretty() |
366 | { |
367 | - var settings = get_settings(U1_ROOT); |
368 | - var folder = get_folder_key(settings, U1_FOLDER_KEY); |
369 | - if (folder == "") |
370 | - return _("Ubuntu One"); |
371 | - else |
372 | - // Translators: %s is a folder. |
373 | - return _("%s on Ubuntu One").printf(folder); |
374 | - } |
375 | - |
376 | - public override async uint64 get_space(bool free = true) |
377 | - { |
378 | - DBusProxy obj = null; |
379 | - try { |
380 | - obj = get_prefs_proxy(); |
381 | - } |
382 | - catch (Error e) { |
383 | - warning("%s\n", e.message); |
384 | - return INFINITE_SPACE; |
385 | - } |
386 | - |
387 | - if (obj.get_name_owner() == null) |
388 | - return INFINITE_SPACE; |
389 | - |
390 | - uint64 total = INFINITE_SPACE; |
391 | - uint64 used = 0; |
392 | - var listener = new Listener(obj, "account_info", null, (name, args) => { |
393 | - if (name == "AccountInfoReady") { |
394 | - VariantIter iter; |
395 | - args.get("(a{ss})", out iter); |
396 | - string key, val; |
397 | - while (iter.next("{ss}", out key, out val)) { |
398 | - if (key == "quota_total") |
399 | - total = uint64.parse(val); |
400 | - else if (key == "quota_used") |
401 | - used = uint64.parse(val); |
402 | - } |
403 | - } |
404 | - }); |
405 | - listener.run(); |
406 | - |
407 | - if (free) |
408 | - return (total > used) ? (total - used) : 0; |
409 | - else |
410 | - return total; |
411 | + return _("Ubuntu One"); |
412 | } |
413 | |
414 | public override async void get_envp() throws Error |
415 | { |
416 | - var obj = get_creds_proxy(); |
417 | - if (obj.get_name_owner() == null) { |
418 | - ask_password(); |
419 | - return; |
420 | - } |
421 | - |
422 | - var found = false; |
423 | - var envp = new List<string>(); |
424 | - var listener = new Listener(obj, "find_credentials", null, (name, args) => { |
425 | - if (name == "CredentialsFound") { |
426 | - VariantIter iter; |
427 | - args.get("(a{ss})", out iter); |
428 | - string key, val; |
429 | - string consumer_key = null, consumer_secret = null, token = null, token_secret = null; |
430 | - while (iter.next("{ss}", out key, out val)) { |
431 | - if (key == "consumer_key") |
432 | - consumer_key = val; |
433 | - else if (key == "consumer_secret") |
434 | - consumer_secret = val; |
435 | - else if (key == "token") |
436 | - token = val; |
437 | - else if (key == "token_secret") |
438 | - token_secret = val; |
439 | - } |
440 | - if (consumer_key != null && consumer_secret != null && token != null && token_secret != null) { |
441 | - envp.append("FTP_PASSWORD=%s:%s:%s:%s".printf(consumer_key, consumer_secret, token, token_secret)); |
442 | - found = true; |
443 | - } |
444 | - } |
445 | - }); |
446 | - listener.run(); |
447 | - |
448 | - if (found) |
449 | - envp_ready(true, envp); |
450 | - else |
451 | - ask_password(); |
452 | - } |
453 | - |
454 | - void button_clicked() |
455 | - { |
456 | - sign_in.begin(); |
457 | - } |
458 | - |
459 | - void ask_password() { |
460 | - mount_op.set("label_title", _("Connect to Ubuntu One")); |
461 | - mount_op.set("label_button", _("Sign into Ubuntu One…")); |
462 | - if (button_handler == 0) |
463 | - button_handler = Signal.connect_swapped(mount_op, "button-clicked", |
464 | - (Callback)button_clicked, this); |
465 | - mount_op.ask_password("", "", "", 0); |
466 | - } |
467 | - |
468 | - async void sign_in() |
469 | - { |
470 | - try { |
471 | - var obj = get_creds_proxy(); |
472 | - if (obj.get_name_owner() == null) { |
473 | - envp_ready(false, null); |
474 | - return; |
475 | - } |
476 | - |
477 | - var listener = new Listener(obj, "login", new Variant("(a{ss})", null), |
478 | - (name, args) => { |
479 | - if (name == "CredentialsFound") { |
480 | - mount_op.set("go_forward", true); |
481 | - envp_ready(true, null); |
482 | - } |
483 | - }); |
484 | - listener.run(); |
485 | - } |
486 | - catch (Error e) { |
487 | - warning("%s\n", e.message); |
488 | - envp_ready(false, null); |
489 | - } |
490 | - } |
491 | - |
492 | - public static DBusProxy get_creds_proxy() throws Error |
493 | - { |
494 | - DBusProxy creds_proxy; |
495 | - creds_proxy = new DBusProxy.for_bus_sync(BusType.SESSION, |
496 | - DBusProxyFlags.NONE, null, |
497 | - "com.ubuntuone.Credentials", |
498 | - "/credentials", |
499 | - "com.ubuntuone.CredentialsManagement", |
500 | - null); |
501 | - return creds_proxy; |
502 | - } |
503 | - |
504 | - public static DBusProxy get_prefs_proxy() throws Error |
505 | - { |
506 | - DBusProxy prefs_proxy; |
507 | - prefs_proxy = new DBusProxy.for_bus_sync(BusType.SESSION, |
508 | - DBusProxyFlags.NONE, null, |
509 | - "com.ubuntuone.controlpanel", |
510 | - "/preferences", |
511 | - "com.ubuntuone.controlpanel.Preferences", |
512 | - null); |
513 | - return prefs_proxy; |
514 | + throw new BackupError.BAD_CONFIG(_("Ubuntu One has shut down. Please choose another storage location.")); |
515 | } |
516 | } |
517 | |
518 | |
519 | === modified file 'libdeja/tests/runner.vala' |
520 | --- libdeja/tests/runner.vala 2013-10-01 02:02:26 +0000 |
521 | +++ libdeja/tests/runner.vala 2014-04-02 18:47:53 +0000 |
522 | @@ -418,13 +418,6 @@ |
523 | if (keyfile.has_key(group, "RestoreDate")) |
524 | br.restore_date = keyfile.get_string(group, "RestoreDate"); |
525 | |
526 | - var type = keyfile.get_string(group, "Type"); |
527 | - if (type == "backup") |
528 | - br.op = new DejaDup.OperationBackup(); |
529 | - else if (type == "restore") |
530 | - br.op = new DejaDup.OperationRestore(restoredir, br.restore_date, br.restore_files); |
531 | - else |
532 | - assert_not_reached(); |
533 | if (keyfile.has_key(group, "Success")) |
534 | br.success = keyfile.get_boolean(group, "Success"); |
535 | if (keyfile.has_key(group, "Canceled")) |
536 | @@ -465,6 +458,13 @@ |
537 | } |
538 | } |
539 | } |
540 | + var type = keyfile.get_string(group, "Type"); |
541 | + if (type == "backup") |
542 | + br.op = new DejaDup.OperationBackup(); |
543 | + else if (type == "restore") |
544 | + br.op = new DejaDup.OperationRestore(restoredir, br.restore_date, br.restore_files); |
545 | + else |
546 | + assert_not_reached(); |
547 | } |
548 | |
549 | string get_string_field(KeyFile keyfile, string group, string key) throws Error |
550 | |
551 | === added file 'libdeja/tests/scripts/u1.test' |
552 | --- libdeja/tests/scripts/u1.test 1970-01-01 00:00:00 +0000 |
553 | +++ libdeja/tests/scripts/u1.test 2014-04-02 18:47:53 +0000 |
554 | @@ -0,0 +1,5 @@ |
555 | +[Operation] |
556 | +Settings=backend='u1'; |
557 | +Type=backup |
558 | +Success=false |
559 | +Error=Ubuntu One has shut down. Please choose another storage location. |
A surgical extraction of U1, indeed.