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 Mergebot (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 Mergebot (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
1=== modified file 'turku_api/views.py'
2--- turku_api/views.py 2020-06-21 23:57:42 +0000
3+++ turku_api/views.py 2021-10-18 16:29:21 +0000
4@@ -374,6 +374,16 @@
5 req_sources[s.name][k]
6 )
7 modified = True
8+ if (
9+ k in ("large_rotating_files", "large_modifying_files")
10+ and k in req_sources[s.name]
11+ and req_sources[s.name][k]
12+ and "snapshot_mode" not in req_sources[s.name]
13+ ):
14+ # The request specified large modifying or rotating files, but not snapshot mode.
15+ # Default to link-dest.
16+ setattr(s, "snapshot_mode", "link-dest")
17+
18 for k in ("filter", "exclude"):
19 if k not in req_sources[s.name]:
20 continue

Subscribers

People subscribed via source and target branches

to all changes: