Merge lp:~dawgfoto/duplicity/skip_sync_collection_status into lp:~duplicity-team/duplicity/0.7-series

Proposed by Martin Nowak
Status: Merged
Merged at revision: 1300
Proposed branch: lp:~dawgfoto/duplicity/skip_sync_collection_status
Merge into: lp:~duplicity-team/duplicity/0.7-series
Diff against target: 46 lines (+6/-9)
1 file modified
bin/duplicity (+6/-9)
To merge this branch: bzr merge lp:~dawgfoto/duplicity/skip_sync_collection_status
Reviewer Review Type Date Requested Status
duplicity-team Pending
Review via email: mp+326716@code.launchpad.net

Description of the change

collection-status should not sync metadata
- up-to-date local metadata is not needed as collection-status is generated from remote file list
- syncing metadata might require to download several GBs

The syncing was introduced with http://bazaar.launchpad.net/~duplicity-team/duplicity/0.7-series/revision/759.2.1/duplicity-bin but seems unnecessary/unrelated to fix that bug.

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 'bin/duplicity'
2--- bin/duplicity 2017-05-11 10:44:21 +0000
3+++ bin/duplicity 2017-07-03 23:59:24 +0000
4@@ -1004,7 +1004,7 @@
5 _("Rerun command with --force option to actually delete."))
6
7
8-def sync_archive(decrypt):
9+def sync_archive():
10 """
11 Synchronize local archive manifest file and sig chains to remote archives.
12 Copy missing files from remote to local as needed to make sure the local
13@@ -1183,11 +1183,8 @@
14 if not globals.dry_run:
15 log.Notice(_("Synchronizing remote metadata to local cache..."))
16 if local_missing and (rem_needpass or loc_needpass):
17- if decrypt:
18- # password for the --encrypt-key
19- globals.gpg_profile.passphrase = get_passphrase(1, "sync")
20- else:
21- local_missing = [] # don't download if we can't decrypt
22+ # password for the --encrypt-key
23+ globals.gpg_profile.passphrase = get_passphrase(1, "sync")
24 for fn in local_spurious:
25 remove_local(fn)
26 if hasattr(globals.backend, 'pre_process_download'):
27@@ -1402,8 +1399,8 @@
28 check_resources(action)
29
30 # check archive synch with remote, fix if needed
31- decrypt = action not in ["collection-status"]
32- sync_archive(decrypt)
33+ if action not in ["collection-status"]:
34+ sync_archive()
35
36 # get current collection status
37 col_stats = collections.CollectionsStatus(globals.backend,
38@@ -1476,7 +1473,7 @@
39 elif action == "remove-all-but-n-full" or action == "remove-all-inc-of-but-n-full":
40 remove_all_but_n_full(col_stats)
41 elif action == "sync":
42- sync_archive(True)
43+ sync_archive()
44 else:
45 assert action == "inc" or action == "full", action
46 # the passphrase for full and inc is used by --sign-key

Subscribers

People subscribed via source and target branches