Merge lp:~sajoupa/turku/turku-api-snapshot-mode-default-link-dest-lmf-lrf into lp:turku/turku-api

Proposed by Laurent Sesquès
Status: Merged
Approved by: Haw Loeung
Approved revision: 68
Merged at revision: 68
Proposed branch: lp:~sajoupa/turku/turku-api-snapshot-mode-default-link-dest-lmf-lrf
Merge into: lp:turku/turku-api
Diff against target: 20 lines (+10/-0)
1 file modified
turku_api/views.py (+10/-0)
To merge this branch: bzr merge lp:~sajoupa/turku/turku-api-snapshot-mode-default-link-dest-lmf-lrf
Reviewer Review Type Date Requested Status
Tom Haddon Approve
Canonical IS Reviewers Pending
Review via email: mp+410390@code.launchpad.net

Commit message

If using large modifying or rotating files, make snapshot-mode default to link-dest

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Tom Haddon (mthaddon) wrote :

LGTM

review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 68

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'turku_api/views.py'
--- turku_api/views.py 2020-06-21 23:57:42 +0000
+++ turku_api/views.py 2021-10-18 16:29:21 +0000
@@ -374,6 +374,16 @@
374 req_sources[s.name][k]374 req_sources[s.name][k]
375 )375 )
376 modified = True376 modified = True
377 if (
378 k in ("large_rotating_files", "large_modifying_files")
379 and k in req_sources[s.name]
380 and req_sources[s.name][k]
381 and "snapshot_mode" not in req_sources[s.name]
382 ):
383 # The request specified large modifying or rotating files, but not snapshot mode.
384 # Default to link-dest.
385 setattr(s, "snapshot_mode", "link-dest")
386
377 for k in ("filter", "exclude"):387 for k in ("filter", "exclude"):
378 if k not in req_sources[s.name]:388 if k not in req_sources[s.name]:
379 continue389 continue

Subscribers

People subscribed via source and target branches

to all changes: