Commit 68bfcdd
committed
Separate the cache logic from message formatting
Allows the callsites to decide what to output. Specifically, the auto
prune in fetching can now omit the message if no files are removed.
Test: # populate cache if necessary
Test: cvd fetch --target_directory=/tmp/cvd/fetch_test
--default_build=12924704,12924909,12924919
Test: cvd cache info
Test: cvd fetch --target_directory=/tmp/cvd/fetch_test2
--default_build=12924921 --max_cache_size_GB=2
Test: # only prunes when caching is enabled
Test: cvd fetch --target_directory=/tmp/cvd/fetch_test3
--default_build=12924578 --max_cache_size_GB=0 --enable_caching=false
Test: cvd cache info
Test: cvd cache empty1 parent 0d11bdd commit 68bfcdd
4 files changed
+60
-36
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
| |||
70 | 69 | | |
71 | 70 | | |
72 | 71 | | |
73 | | - | |
| 72 | + | |
74 | 73 | | |
75 | 74 | | |
76 | 75 | | |
77 | | - | |
| 76 | + | |
78 | 77 | | |
79 | 78 | | |
80 | | - | |
81 | | - | |
| 79 | + | |
82 | 80 | | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
| 81 | + | |
91 | 82 | | |
92 | 83 | | |
93 | | - | |
94 | | - | |
| 84 | + | |
| 85 | + | |
95 | 86 | | |
96 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
97 | 91 | | |
98 | 92 | | |
99 | 93 | | |
100 | | - | |
| 94 | + | |
101 | 95 | | |
102 | 96 | | |
103 | | - | |
| 97 | + | |
104 | 98 | | |
105 | 99 | | |
106 | 100 | | |
| |||
109 | 103 | | |
110 | 104 | | |
111 | 105 | | |
112 | | - | |
113 | | - | |
| 106 | + | |
| 107 | + | |
114 | 108 | | |
115 | 109 | | |
116 | 110 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
32 | 36 | | |
33 | 37 | | |
34 | 38 | | |
Lines changed: 32 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
109 | 111 | | |
110 | 112 | | |
111 | 113 | | |
112 | | - | |
113 | | - | |
114 | | - | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
115 | 118 | | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
120 | 132 | | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
126 | 145 | | |
| 146 | + | |
127 | 147 | | |
128 | 148 | | |
129 | 149 | | |
| |||
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
72 | 78 | | |
73 | 79 | | |
74 | 80 | | |
| |||
0 commit comments