Show More
@@ -1,943 +1,946 | |||
|
1 | 1 | #require no-reposimplestore no-chg |
|
2 | 2 | #testcases git-server hg-server |
|
3 | 3 | |
|
4 | 4 | #if git-server |
|
5 | 5 | #require lfs-test-server |
|
6 | 6 | #else |
|
7 | 7 | #require serve |
|
8 | 8 | #endif |
|
9 | 9 | |
|
10 | 10 | #if git-server |
|
11 | 11 | $ LFS_LISTEN="tcp://:$HGPORT" |
|
12 | 12 | $ LFS_HOST="localhost:$HGPORT" |
|
13 | 13 | $ LFS_PUBLIC=1 |
|
14 | 14 | $ export LFS_LISTEN LFS_HOST LFS_PUBLIC |
|
15 | 15 | #else |
|
16 | 16 | $ LFS_HOST="localhost:$HGPORT/.git/info/lfs" |
|
17 | 17 | #endif |
|
18 | 18 | |
|
19 | 19 | #if no-windows git-server |
|
20 | 20 | $ lfs-test-server &> lfs-server.log & |
|
21 | 21 | $ echo $! >> $DAEMON_PIDS |
|
22 | 22 | #endif |
|
23 | 23 | |
|
24 | 24 | #if windows git-server |
|
25 | 25 | $ cat >> $TESTTMP/spawn.py <<EOF |
|
26 | 26 | > import os |
|
27 | 27 | > import subprocess |
|
28 | 28 | > import sys |
|
29 | 29 | > |
|
30 | 30 | > for path in os.environ["PATH"].split(os.pathsep): |
|
31 | 31 | > exe = os.path.join(path, 'lfs-test-server.exe') |
|
32 | 32 | > if os.path.exists(exe): |
|
33 | 33 | > with open('lfs-server.log', 'wb') as out: |
|
34 | 34 | > p = subprocess.Popen(exe, stdout=out, stderr=out) |
|
35 | 35 | > sys.stdout.write('%s\n' % p.pid) |
|
36 | 36 | > sys.exit(0) |
|
37 | 37 | > sys.exit(1) |
|
38 | 38 | > EOF |
|
39 | 39 | $ "$PYTHON" $TESTTMP/spawn.py >> $DAEMON_PIDS |
|
40 | 40 | #endif |
|
41 | 41 | |
|
42 | 42 | $ cat >> $HGRCPATH <<EOF |
|
43 | 43 | > [experimental] |
|
44 | 44 | > lfs.worker-enable = False |
|
45 | 45 | > [extensions] |
|
46 | 46 | > lfs= |
|
47 | 47 | > [lfs] |
|
48 | 48 | > url=http://foo:bar@$LFS_HOST |
|
49 | 49 | > track=all() |
|
50 | 50 | > [web] |
|
51 | 51 | > push_ssl = False |
|
52 | 52 | > allow-push = * |
|
53 | 53 | > EOF |
|
54 | 54 | |
|
55 | 55 | Use a separate usercache, otherwise the server sees what the client commits, and |
|
56 | 56 | never requests a transfer. |
|
57 | 57 | |
|
58 | 58 | #if hg-server |
|
59 | 59 | $ hg init server |
|
60 | 60 | $ hg --config "lfs.usercache=$TESTTMP/servercache" -R server serve -d \ |
|
61 | 61 | > -p $HGPORT --pid-file=hg.pid -A $TESTTMP/access.log -E $TESTTMP/errors.log |
|
62 | 62 | $ cat hg.pid >> $DAEMON_PIDS |
|
63 | 63 | #endif |
|
64 | 64 | |
|
65 | 65 | $ hg init repo1 |
|
66 | 66 | $ cd repo1 |
|
67 | 67 | $ echo THIS-IS-LFS > a |
|
68 | 68 | $ hg commit -m a -A a |
|
69 | 69 | |
|
70 | 70 | A push can be serviced directly from the usercache if it isn't in the local |
|
71 | 71 | store. |
|
72 | 72 | |
|
73 | 73 | $ hg init ../repo2 |
|
74 | 74 | $ mv .hg/store/lfs .hg/store/lfs_ |
|
75 | 75 | $ hg push ../repo2 --debug |
|
76 | 76 | http auth: user foo, password *** |
|
77 | 77 | pushing to ../repo2 |
|
78 | 78 | http auth: user foo, password *** |
|
79 | 79 | http auth: user foo, password *** |
|
80 | 80 | query 1; heads |
|
81 | 81 | searching for changes |
|
82 | 82 | 1 total queries in *s (glob) |
|
83 | 83 | listing keys for "phases" |
|
84 | 84 | checking for updated bookmarks |
|
85 | 85 | listing keys for "bookmarks" |
|
86 | 86 | lfs: computing set of blobs to upload |
|
87 | 87 | Status: 200 |
|
88 | 88 | Content-Length: 309 (git-server !) |
|
89 | 89 | Content-Length: 350 (hg-server !) |
|
90 | 90 | Content-Type: application/vnd.git-lfs+json |
|
91 | 91 | Date: $HTTP_DATE$ |
|
92 | 92 | Server: testing stub value (hg-server !) |
|
93 | 93 | { |
|
94 | 94 | "objects": [ |
|
95 | 95 | { |
|
96 | 96 | "actions": { |
|
97 | 97 | "upload": { |
|
98 | 98 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
99 | 99 | "header": { |
|
100 | 100 | "Accept": "application/vnd.git-lfs" |
|
101 | 101 | } |
|
102 | 102 | "href": "http://localhost:$HGPORT/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (git-server !) |
|
103 | 103 | "href": "http://localhost:$HGPORT/.hg/lfs/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (hg-server !) |
|
104 | 104 | } |
|
105 | 105 | } |
|
106 | 106 | "oid": "31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" |
|
107 | 107 | "size": 12 |
|
108 | 108 | } |
|
109 | 109 | ] |
|
110 | 110 | "transfer": "basic" (hg-server !) |
|
111 | 111 | } |
|
112 | 112 | lfs: uploading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes) |
|
113 | 113 | Status: 200 (git-server !) |
|
114 | 114 | Status: 201 (hg-server !) |
|
115 | 115 | Content-Length: 0 |
|
116 | 116 | Content-Type: text/plain; charset=utf-8 |
|
117 | 117 | Date: $HTTP_DATE$ |
|
118 | 118 | Server: testing stub value (hg-server !) |
|
119 | 119 | lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b |
|
120 | 120 | lfs: uploaded 1 files (12 bytes) |
|
121 | 121 | 1 changesets found |
|
122 | 122 | list of changesets: |
|
123 | 123 | 99a7098854a3984a5c9eab0fc7a2906697b7cb5c |
|
124 | 124 | bundle2-output-bundle: "HG20", 4 parts total |
|
125 | 125 | bundle2-output-part: "replycaps" * bytes payload (glob) |
|
126 | 126 | bundle2-output-part: "check:heads" streamed payload |
|
127 | 127 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
128 | 128 | bundle2-output-part: "phase-heads" 24 bytes payload |
|
129 | 129 | bundle2-input-bundle: with-transaction |
|
130 | 130 | bundle2-input-part: "replycaps" supported |
|
131 | 131 | bundle2-input-part: total payload size * (glob) |
|
132 | 132 | bundle2-input-part: "check:heads" supported |
|
133 | 133 | bundle2-input-part: total payload size 20 |
|
134 | 134 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
135 | 135 | adding changesets |
|
136 | 136 | add changeset 99a7098854a3 |
|
137 | 137 | adding manifests |
|
138 | 138 | adding file changes |
|
139 | 139 | adding a revisions |
|
140 | 140 | calling hook pretxnchangegroup.lfs: hgext.lfs.checkrequireslfs |
|
141 | 141 | bundle2-input-part: total payload size 617 |
|
142 | 142 | bundle2-input-part: "phase-heads" supported |
|
143 | 143 | bundle2-input-part: total payload size 24 |
|
144 | 144 | bundle2-input-bundle: 4 parts total |
|
145 | 145 | updating the branch cache |
|
146 | 146 | added 1 changesets with 1 changes to 1 files |
|
147 | 147 | bundle2-output-bundle: "HG20", 1 parts total |
|
148 | 148 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload |
|
149 | 149 | bundle2-input-bundle: no-transaction |
|
150 | 150 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported |
|
151 | 151 | bundle2-input-bundle: 1 parts total |
|
152 | 152 | listing keys for "phases" |
|
153 | 153 | $ mv .hg/store/lfs_ .hg/store/lfs |
|
154 | 154 | |
|
155 | 155 | Clear the cache to force a download |
|
156 | 156 | $ rm -rf `hg config lfs.usercache` |
|
157 | 157 | $ cd ../repo2 |
|
158 | 158 | $ hg update tip --debug |
|
159 | 159 | http auth: user foo, password *** |
|
160 | 160 | resolving manifests |
|
161 | 161 | branchmerge: False, force: False, partial: False |
|
162 | 162 | ancestor: 000000000000, local: 000000000000+, remote: 99a7098854a3 |
|
163 | 163 | http auth: user foo, password *** |
|
164 | 164 | Status: 200 |
|
165 | 165 | Content-Length: 311 (git-server !) |
|
166 | 166 | Content-Length: 352 (hg-server !) |
|
167 | 167 | Content-Type: application/vnd.git-lfs+json |
|
168 | 168 | Date: $HTTP_DATE$ |
|
169 | 169 | Server: testing stub value (hg-server !) |
|
170 | 170 | { |
|
171 | 171 | "objects": [ |
|
172 | 172 | { |
|
173 | 173 | "actions": { |
|
174 | 174 | "download": { |
|
175 | 175 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
176 | 176 | "header": { |
|
177 | 177 | "Accept": "application/vnd.git-lfs" |
|
178 | 178 | } |
|
179 | 179 | "href": "http://localhost:$HGPORT/*/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (glob) |
|
180 | 180 | } |
|
181 | 181 | } |
|
182 | 182 | "oid": "31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" |
|
183 | 183 | "size": 12 |
|
184 | 184 | } |
|
185 | 185 | ] |
|
186 | 186 | "transfer": "basic" (hg-server !) |
|
187 | 187 | } |
|
188 | 188 | lfs: downloading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes) |
|
189 | 189 | Status: 200 |
|
190 | 190 | Content-Length: 12 |
|
191 | 191 | Content-Type: text/plain; charset=utf-8 (git-server !) |
|
192 | 192 | Content-Type: application/octet-stream (hg-server !) |
|
193 | 193 | Date: $HTTP_DATE$ |
|
194 | 194 | Server: testing stub value (hg-server !) |
|
195 | 195 | lfs: adding 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b to the usercache |
|
196 | 196 | lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b |
|
197 | 197 | lfs: downloaded 1 files (12 bytes) |
|
198 | 198 | a: remote created -> g |
|
199 | 199 | getting a |
|
200 | 200 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store |
|
201 | 201 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
202 | 202 | |
|
203 | 203 | When the server has some blobs already. `hg serve` doesn't offer to upload |
|
204 | 204 | blobs that it already knows about. Note that lfs-test-server is simply |
|
205 | 205 | toggling the action to 'download'. The Batch API spec says it should omit the |
|
206 | 206 | actions property completely. |
|
207 | 207 | |
|
208 | 208 | $ hg mv a b |
|
209 | 209 | $ echo ANOTHER-LARGE-FILE > c |
|
210 | 210 | $ echo ANOTHER-LARGE-FILE2 > d |
|
211 | 211 | $ hg commit -m b-and-c -A b c d |
|
212 | 212 | $ hg push ../repo1 --debug |
|
213 | 213 | http auth: user foo, password *** |
|
214 | 214 | pushing to ../repo1 |
|
215 | 215 | http auth: user foo, password *** |
|
216 | 216 | http auth: user foo, password *** |
|
217 | 217 | query 1; heads |
|
218 | 218 | searching for changes |
|
219 | 219 | all remote heads known locally |
|
220 | 220 | listing keys for "phases" |
|
221 | 221 | checking for updated bookmarks |
|
222 | 222 | listing keys for "bookmarks" |
|
223 | 223 | listing keys for "bookmarks" |
|
224 | 224 | lfs: computing set of blobs to upload |
|
225 | 225 | Status: 200 |
|
226 | 226 | Content-Length: 901 (git-server !) |
|
227 | 227 | Content-Length: 755 (hg-server !) |
|
228 | 228 | Content-Type: application/vnd.git-lfs+json |
|
229 | 229 | Date: $HTTP_DATE$ |
|
230 | 230 | Server: testing stub value (hg-server !) |
|
231 | 231 | { |
|
232 | 232 | "objects": [ |
|
233 | 233 | { |
|
234 | 234 | "actions": { (git-server !) |
|
235 | 235 | "download": { (git-server !) |
|
236 | 236 | "expires_at": "$ISO_8601_DATE_TIME$" (git-server !) |
|
237 | 237 | "header": { (git-server !) |
|
238 | 238 | "Accept": "application/vnd.git-lfs" (git-server !) |
|
239 | 239 | } (git-server !) |
|
240 | 240 | "href": "http://localhost:$HGPORT/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (git-server !) |
|
241 | 241 | } (git-server !) |
|
242 | 242 | } (git-server !) |
|
243 | 243 | "oid": "31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" |
|
244 | 244 | "size": 12 |
|
245 | 245 | } |
|
246 | 246 | { |
|
247 | 247 | "actions": { |
|
248 | 248 | "upload": { |
|
249 | 249 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
250 | 250 | "header": { |
|
251 | 251 | "Accept": "application/vnd.git-lfs" |
|
252 | 252 | } |
|
253 | 253 | "href": "http://localhost:$HGPORT/*/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19" (glob) |
|
254 | 254 | } |
|
255 | 255 | } |
|
256 | 256 | "oid": "37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19" |
|
257 | 257 | "size": 20 |
|
258 | 258 | } |
|
259 | 259 | { |
|
260 | 260 | "actions": { |
|
261 | 261 | "upload": { |
|
262 | 262 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
263 | 263 | "header": { |
|
264 | 264 | "Accept": "application/vnd.git-lfs" |
|
265 | 265 | } |
|
266 | 266 | "href": "http://localhost:$HGPORT/*/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" (glob) |
|
267 | 267 | } |
|
268 | 268 | } |
|
269 | 269 | "oid": "d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" |
|
270 | 270 | "size": 19 |
|
271 | 271 | } |
|
272 | 272 | ] |
|
273 | 273 | "transfer": "basic" (hg-server !) |
|
274 | 274 | } |
|
275 | 275 | lfs: need to transfer 2 objects (39 bytes) |
|
276 | 276 | lfs: uploading 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 (20 bytes) |
|
277 | 277 | Status: 200 (git-server !) |
|
278 | 278 | Status: 201 (hg-server !) |
|
279 | 279 | Content-Length: 0 |
|
280 | 280 | Content-Type: text/plain; charset=utf-8 |
|
281 | 281 | Date: $HTTP_DATE$ |
|
282 | 282 | Server: testing stub value (hg-server !) |
|
283 | 283 | lfs: processed: 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 |
|
284 | 284 | lfs: uploading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) |
|
285 | 285 | Status: 200 (git-server !) |
|
286 | 286 | Status: 201 (hg-server !) |
|
287 | 287 | Content-Length: 0 |
|
288 | 288 | Content-Type: text/plain; charset=utf-8 |
|
289 | 289 | Date: $HTTP_DATE$ |
|
290 | 290 | Server: testing stub value (hg-server !) |
|
291 | 291 | lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
292 | 292 | lfs: uploaded 2 files (39 bytes) |
|
293 | 293 | 1 changesets found |
|
294 | 294 | list of changesets: |
|
295 | 295 | dfca2c9e2ef24996aa61ba2abd99277d884b3d63 |
|
296 | 296 | bundle2-output-bundle: "HG20", 5 parts total |
|
297 | 297 | bundle2-output-part: "replycaps" * bytes payload (glob) |
|
298 | 298 | bundle2-output-part: "check:phases" 24 bytes payload |
|
299 | 299 | bundle2-output-part: "check:updated-heads" streamed payload |
|
300 | 300 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload |
|
301 | 301 | bundle2-output-part: "phase-heads" 24 bytes payload |
|
302 | 302 | bundle2-input-bundle: with-transaction |
|
303 | 303 | bundle2-input-part: "replycaps" supported |
|
304 | 304 | bundle2-input-part: total payload size * (glob) |
|
305 | 305 | bundle2-input-part: "check:phases" supported |
|
306 | 306 | bundle2-input-part: total payload size 24 |
|
307 | 307 | bundle2-input-part: "check:updated-heads" supported |
|
308 | 308 | bundle2-input-part: total payload size 20 |
|
309 | 309 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported |
|
310 | 310 | adding changesets |
|
311 | 311 | add changeset dfca2c9e2ef2 |
|
312 | 312 | adding manifests |
|
313 | 313 | adding file changes |
|
314 | 314 | adding b revisions |
|
315 | 315 | adding c revisions |
|
316 | 316 | adding d revisions |
|
317 | 317 | bundle2-input-part: total payload size 1315 |
|
318 | 318 | bundle2-input-part: "phase-heads" supported |
|
319 | 319 | bundle2-input-part: total payload size 24 |
|
320 | 320 | bundle2-input-bundle: 5 parts total |
|
321 | 321 | updating the branch cache |
|
322 | 322 | added 1 changesets with 3 changes to 3 files |
|
323 | 323 | bundle2-output-bundle: "HG20", 1 parts total |
|
324 | 324 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload |
|
325 | 325 | bundle2-input-bundle: no-transaction |
|
326 | 326 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported |
|
327 | 327 | bundle2-input-bundle: 1 parts total |
|
328 | 328 | listing keys for "phases" |
|
329 | 329 | |
|
330 | 330 | Clear the cache to force a download |
|
331 | 331 | $ rm -rf `hg config lfs.usercache` |
|
332 | 332 | $ hg --repo ../repo1 update tip --debug |
|
333 | 333 | http auth: user foo, password *** |
|
334 | 334 | resolving manifests |
|
335 | 335 | branchmerge: False, force: False, partial: False |
|
336 | 336 | ancestor: 99a7098854a3, local: 99a7098854a3+, remote: dfca2c9e2ef2 |
|
337 | 337 | http auth: user foo, password *** |
|
338 | 338 | Status: 200 |
|
339 | 339 | Content-Length: 608 (git-server !) |
|
340 | 340 | Content-Length: 670 (hg-server !) |
|
341 | 341 | Content-Type: application/vnd.git-lfs+json |
|
342 | 342 | Date: $HTTP_DATE$ |
|
343 | 343 | Server: testing stub value (hg-server !) |
|
344 | 344 | { |
|
345 | 345 | "objects": [ |
|
346 | 346 | { |
|
347 | 347 | "actions": { |
|
348 | 348 | "download": { |
|
349 | 349 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
350 | 350 | "header": { |
|
351 | 351 | "Accept": "application/vnd.git-lfs" |
|
352 | 352 | } |
|
353 | 353 | "href": "http://localhost:$HGPORT/*/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19" (glob) |
|
354 | 354 | } |
|
355 | 355 | } |
|
356 | 356 | "oid": "37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19" |
|
357 | 357 | "size": 20 |
|
358 | 358 | } |
|
359 | 359 | { |
|
360 | 360 | "actions": { |
|
361 | 361 | "download": { |
|
362 | 362 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
363 | 363 | "header": { |
|
364 | 364 | "Accept": "application/vnd.git-lfs" |
|
365 | 365 | } |
|
366 | 366 | "href": "http://localhost:$HGPORT/*/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" (glob) |
|
367 | 367 | } |
|
368 | 368 | } |
|
369 | 369 | "oid": "d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" |
|
370 | 370 | "size": 19 |
|
371 | 371 | } |
|
372 | 372 | ] |
|
373 | 373 | "transfer": "basic" (hg-server !) |
|
374 | 374 | } |
|
375 | 375 | lfs: need to transfer 2 objects (39 bytes) |
|
376 | 376 | lfs: downloading 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 (20 bytes) |
|
377 | 377 | Status: 200 |
|
378 | 378 | Content-Length: 20 |
|
379 | 379 | Content-Type: text/plain; charset=utf-8 (git-server !) |
|
380 | 380 | Content-Type: application/octet-stream (hg-server !) |
|
381 | 381 | Date: $HTTP_DATE$ |
|
382 | 382 | Server: testing stub value (hg-server !) |
|
383 | 383 | lfs: adding 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 to the usercache |
|
384 | 384 | lfs: processed: 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 |
|
385 | 385 | lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) |
|
386 | 386 | Status: 200 |
|
387 | 387 | Content-Length: 19 |
|
388 | 388 | Content-Type: text/plain; charset=utf-8 (git-server !) |
|
389 | 389 | Content-Type: application/octet-stream (hg-server !) |
|
390 | 390 | Date: $HTTP_DATE$ |
|
391 | 391 | Server: testing stub value (hg-server !) |
|
392 | 392 | lfs: adding d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 to the usercache |
|
393 | 393 | lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
394 | 394 | lfs: downloaded 2 files (39 bytes) |
|
395 | 395 | b: remote created -> g |
|
396 | 396 | getting b |
|
397 | 397 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store |
|
398 | 398 | c: remote created -> g |
|
399 | 399 | getting c |
|
400 | 400 | lfs: found d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 in the local lfs store |
|
401 | 401 | d: remote created -> g |
|
402 | 402 | getting d |
|
403 | 403 | lfs: found 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 in the local lfs store |
|
404 | 404 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
405 | 405 | |
|
406 | 406 | Test a corrupt file download, but clear the cache first to force a download. |
|
407 | 407 | `hg serve` indicates a corrupt file without transferring it, unlike |
|
408 | 408 | lfs-test-server. |
|
409 | 409 | |
|
410 | 410 | $ rm -rf `hg config lfs.usercache` |
|
411 | 411 | #if git-server |
|
412 | 412 | $ cp $TESTTMP/lfs-content/d1/1e/1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 blob |
|
413 | 413 | $ echo 'damage' > $TESTTMP/lfs-content/d1/1e/1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
414 | 414 | #else |
|
415 | 415 | $ cp $TESTTMP/server/.hg/store/lfs/objects/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 blob |
|
416 | 416 | $ echo 'damage' > $TESTTMP/server/.hg/store/lfs/objects/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
417 | 417 | #endif |
|
418 | 418 | $ rm ../repo1/.hg/store/lfs/objects/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
419 | 419 | $ rm ../repo1/* |
|
420 | 420 | |
|
421 | 421 | TODO: give the proper error indication from `hg serve` |
|
422 | 422 | |
|
423 | $ hg --repo ../repo1 update -C tip --debug | |
|
423 | TODO: reconsider the except base class so that the git and hg errors yield the | |
|
424 | same exit status. | |
|
425 | ||
|
426 | $ hg --repo ../repo1 update -C tip --debug --config ui.detailed-exit-code=False | |
|
424 | 427 | http auth: user foo, password *** |
|
425 | 428 | resolving manifests |
|
426 | 429 | branchmerge: False, force: True, partial: False |
|
427 | 430 | ancestor: dfca2c9e2ef2+, local: dfca2c9e2ef2+, remote: dfca2c9e2ef2 |
|
428 | 431 | http auth: user foo, password *** |
|
429 | 432 | Status: 200 |
|
430 | 433 | Content-Length: 311 (git-server !) |
|
431 | 434 | Content-Length: 183 (hg-server !) |
|
432 | 435 | Content-Type: application/vnd.git-lfs+json |
|
433 | 436 | Date: $HTTP_DATE$ |
|
434 | 437 | Server: testing stub value (hg-server !) |
|
435 | 438 | { |
|
436 | 439 | "objects": [ |
|
437 | 440 | { |
|
438 | 441 | "actions": { (git-server !) |
|
439 | 442 | "download": { (git-server !) |
|
440 | 443 | "expires_at": "$ISO_8601_DATE_TIME$" (git-server !) |
|
441 | 444 | "header": { (git-server !) |
|
442 | 445 | "Accept": "application/vnd.git-lfs" (git-server !) |
|
443 | 446 | } (git-server !) |
|
444 | 447 | "href": "http://localhost:$HGPORT/objects/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" (git-server !) |
|
445 | 448 | } (git-server !) |
|
446 | 449 | "error": { (hg-server !) |
|
447 | 450 | "code": 422 (hg-server !) |
|
448 | 451 | "message": "The object is corrupt" (hg-server !) |
|
449 | 452 | } |
|
450 | 453 | "oid": "d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" |
|
451 | 454 | "size": 19 |
|
452 | 455 | } |
|
453 | 456 | ] |
|
454 | 457 | "transfer": "basic" (hg-server !) |
|
455 | 458 | } |
|
456 | 459 | lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) (git-server !) |
|
457 | 460 | Status: 200 (git-server !) |
|
458 | 461 | Content-Length: 7 (git-server !) |
|
459 | 462 | Content-Type: text/plain; charset=utf-8 (git-server !) |
|
460 | 463 | Date: $HTTP_DATE$ (git-server !) |
|
461 | 464 | abort: corrupt remote lfs object: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (git-server !) |
|
462 | 465 | abort: LFS server error for "c": Validation error (hg-server !) |
|
463 |
[5 |
|
|
466 | [255] | |
|
464 | 467 | |
|
465 | 468 | The corrupted blob is not added to the usercache or local store |
|
466 | 469 | |
|
467 | 470 | $ test -f ../repo1/.hg/store/lfs/objects/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
468 | 471 | [1] |
|
469 | 472 | $ test -f `hg config lfs.usercache`/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
470 | 473 | [1] |
|
471 | 474 | #if git-server |
|
472 | 475 | $ cp blob $TESTTMP/lfs-content/d1/1e/1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
473 | 476 | #else |
|
474 | 477 | $ cp blob $TESTTMP/server/.hg/store/lfs/objects/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
475 | 478 | #endif |
|
476 | 479 | |
|
477 | 480 | Test a corrupted file upload |
|
478 | 481 | |
|
479 | 482 | $ echo 'another lfs blob' > b |
|
480 | 483 | $ hg ci -m 'another blob' |
|
481 | 484 | $ echo 'damage' > .hg/store/lfs/objects/e6/59058e26b07b39d2a9c7145b3f99b41f797b6621c8076600e9cb7ee88291f0 |
|
482 | 485 | $ hg push --debug ../repo1 |
|
483 | 486 | http auth: user foo, password *** |
|
484 | 487 | pushing to ../repo1 |
|
485 | 488 | http auth: user foo, password *** |
|
486 | 489 | http auth: user foo, password *** |
|
487 | 490 | query 1; heads |
|
488 | 491 | searching for changes |
|
489 | 492 | all remote heads known locally |
|
490 | 493 | listing keys for "phases" |
|
491 | 494 | checking for updated bookmarks |
|
492 | 495 | listing keys for "bookmarks" |
|
493 | 496 | listing keys for "bookmarks" |
|
494 | 497 | lfs: computing set of blobs to upload |
|
495 | 498 | Status: 200 |
|
496 | 499 | Content-Length: 309 (git-server !) |
|
497 | 500 | Content-Length: 350 (hg-server !) |
|
498 | 501 | Content-Type: application/vnd.git-lfs+json |
|
499 | 502 | Date: $HTTP_DATE$ |
|
500 | 503 | Server: testing stub value (hg-server !) |
|
501 | 504 | { |
|
502 | 505 | "objects": [ |
|
503 | 506 | { |
|
504 | 507 | "actions": { |
|
505 | 508 | "upload": { |
|
506 | 509 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
507 | 510 | "header": { |
|
508 | 511 | "Accept": "application/vnd.git-lfs" |
|
509 | 512 | } |
|
510 | 513 | "href": "http://localhost:$HGPORT/*/e659058e26b07b39d2a9c7145b3f99b41f797b6621c8076600e9cb7ee88291f0" (glob) |
|
511 | 514 | } |
|
512 | 515 | } |
|
513 | 516 | "oid": "e659058e26b07b39d2a9c7145b3f99b41f797b6621c8076600e9cb7ee88291f0" |
|
514 | 517 | "size": 17 |
|
515 | 518 | } |
|
516 | 519 | ] |
|
517 | 520 | "transfer": "basic" (hg-server !) |
|
518 | 521 | } |
|
519 | 522 | lfs: uploading e659058e26b07b39d2a9c7145b3f99b41f797b6621c8076600e9cb7ee88291f0 (17 bytes) |
|
520 | 523 | abort: detected corrupt lfs object: e659058e26b07b39d2a9c7145b3f99b41f797b6621c8076600e9cb7ee88291f0 |
|
521 | 524 | (run hg verify) |
|
522 | 525 | [255] |
|
523 | 526 | |
|
524 | 527 | Archive will prefetch blobs in a group |
|
525 | 528 | |
|
526 | 529 | $ rm -rf .hg/store/lfs `hg config lfs.usercache` |
|
527 | 530 | $ hg archive --debug -r 1 ../archive |
|
528 | 531 | http auth: user foo, password *** |
|
529 | 532 | http auth: user foo, password *** |
|
530 | 533 | Status: 200 |
|
531 | 534 | Content-Length: 905 (git-server !) |
|
532 | 535 | Content-Length: 988 (hg-server !) |
|
533 | 536 | Content-Type: application/vnd.git-lfs+json |
|
534 | 537 | Date: $HTTP_DATE$ |
|
535 | 538 | Server: testing stub value (hg-server !) |
|
536 | 539 | { |
|
537 | 540 | "objects": [ |
|
538 | 541 | { |
|
539 | 542 | "actions": { |
|
540 | 543 | "download": { |
|
541 | 544 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
542 | 545 | "header": { |
|
543 | 546 | "Accept": "application/vnd.git-lfs" |
|
544 | 547 | } |
|
545 | 548 | "href": "http://localhost:$HGPORT/*/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (glob) |
|
546 | 549 | } |
|
547 | 550 | } |
|
548 | 551 | "oid": "31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" |
|
549 | 552 | "size": 12 |
|
550 | 553 | } |
|
551 | 554 | { |
|
552 | 555 | "actions": { |
|
553 | 556 | "download": { |
|
554 | 557 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
555 | 558 | "header": { |
|
556 | 559 | "Accept": "application/vnd.git-lfs" |
|
557 | 560 | } |
|
558 | 561 | "href": "http://localhost:$HGPORT/*/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19" (glob) |
|
559 | 562 | } |
|
560 | 563 | } |
|
561 | 564 | "oid": "37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19" |
|
562 | 565 | "size": 20 |
|
563 | 566 | } |
|
564 | 567 | { |
|
565 | 568 | "actions": { |
|
566 | 569 | "download": { |
|
567 | 570 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
568 | 571 | "header": { |
|
569 | 572 | "Accept": "application/vnd.git-lfs" |
|
570 | 573 | } |
|
571 | 574 | "href": "http://localhost:$HGPORT/*/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" (glob) |
|
572 | 575 | } |
|
573 | 576 | } |
|
574 | 577 | "oid": "d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" |
|
575 | 578 | "size": 19 |
|
576 | 579 | } |
|
577 | 580 | ] |
|
578 | 581 | "transfer": "basic" (hg-server !) |
|
579 | 582 | } |
|
580 | 583 | lfs: need to transfer 3 objects (51 bytes) |
|
581 | 584 | lfs: downloading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes) |
|
582 | 585 | Status: 200 |
|
583 | 586 | Content-Length: 12 |
|
584 | 587 | Content-Type: text/plain; charset=utf-8 (git-server !) |
|
585 | 588 | Content-Type: application/octet-stream (hg-server !) |
|
586 | 589 | Date: $HTTP_DATE$ |
|
587 | 590 | Server: testing stub value (hg-server !) |
|
588 | 591 | lfs: adding 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b to the usercache |
|
589 | 592 | lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b |
|
590 | 593 | lfs: downloading 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 (20 bytes) |
|
591 | 594 | Status: 200 |
|
592 | 595 | Content-Length: 20 |
|
593 | 596 | Content-Type: text/plain; charset=utf-8 (git-server !) |
|
594 | 597 | Content-Type: application/octet-stream (hg-server !) |
|
595 | 598 | Date: $HTTP_DATE$ |
|
596 | 599 | Server: testing stub value (hg-server !) |
|
597 | 600 | lfs: adding 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 to the usercache |
|
598 | 601 | lfs: processed: 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 |
|
599 | 602 | lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) |
|
600 | 603 | Status: 200 |
|
601 | 604 | Content-Length: 19 |
|
602 | 605 | Content-Type: text/plain; charset=utf-8 (git-server !) |
|
603 | 606 | Content-Type: application/octet-stream (hg-server !) |
|
604 | 607 | Date: $HTTP_DATE$ |
|
605 | 608 | Server: testing stub value (hg-server !) |
|
606 | 609 | lfs: adding d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 to the usercache |
|
607 | 610 | lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
608 | 611 | lfs: downloaded 3 files (51 bytes) |
|
609 | 612 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store |
|
610 | 613 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store |
|
611 | 614 | lfs: found d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 in the local lfs store |
|
612 | 615 | lfs: found 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 in the local lfs store |
|
613 | 616 | $ find ../archive | sort |
|
614 | 617 | ../archive |
|
615 | 618 | ../archive/.hg_archival.txt |
|
616 | 619 | ../archive/a |
|
617 | 620 | ../archive/b |
|
618 | 621 | ../archive/c |
|
619 | 622 | ../archive/d |
|
620 | 623 | |
|
621 | 624 | Cat will prefetch blobs in a group |
|
622 | 625 | |
|
623 | 626 | $ rm -rf .hg/store/lfs `hg config lfs.usercache` |
|
624 | 627 | $ hg cat --debug -r 1 a b c nonexistent |
|
625 | 628 | http auth: user foo, password *** |
|
626 | 629 | http auth: user foo, password *** |
|
627 | 630 | Status: 200 |
|
628 | 631 | Content-Length: 608 (git-server !) |
|
629 | 632 | Content-Length: 670 (hg-server !) |
|
630 | 633 | Content-Type: application/vnd.git-lfs+json |
|
631 | 634 | Date: $HTTP_DATE$ |
|
632 | 635 | Server: testing stub value (hg-server !) |
|
633 | 636 | { |
|
634 | 637 | "objects": [ |
|
635 | 638 | { |
|
636 | 639 | "actions": { |
|
637 | 640 | "download": { |
|
638 | 641 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
639 | 642 | "header": { |
|
640 | 643 | "Accept": "application/vnd.git-lfs" |
|
641 | 644 | } |
|
642 | 645 | "href": "http://localhost:$HGPORT/*/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (glob) |
|
643 | 646 | } |
|
644 | 647 | } |
|
645 | 648 | "oid": "31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" |
|
646 | 649 | "size": 12 |
|
647 | 650 | } |
|
648 | 651 | { |
|
649 | 652 | "actions": { |
|
650 | 653 | "download": { |
|
651 | 654 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
652 | 655 | "header": { |
|
653 | 656 | "Accept": "application/vnd.git-lfs" |
|
654 | 657 | } |
|
655 | 658 | "href": "http://localhost:$HGPORT/*/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" (glob) |
|
656 | 659 | } |
|
657 | 660 | } |
|
658 | 661 | "oid": "d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" |
|
659 | 662 | "size": 19 |
|
660 | 663 | } |
|
661 | 664 | ] |
|
662 | 665 | "transfer": "basic" (hg-server !) |
|
663 | 666 | } |
|
664 | 667 | lfs: need to transfer 2 objects (31 bytes) |
|
665 | 668 | lfs: downloading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes) |
|
666 | 669 | Status: 200 |
|
667 | 670 | Content-Length: 12 |
|
668 | 671 | Content-Type: text/plain; charset=utf-8 (git-server !) |
|
669 | 672 | Content-Type: application/octet-stream (hg-server !) |
|
670 | 673 | Date: $HTTP_DATE$ |
|
671 | 674 | Server: testing stub value (hg-server !) |
|
672 | 675 | lfs: adding 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b to the usercache |
|
673 | 676 | lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b |
|
674 | 677 | lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) |
|
675 | 678 | Status: 200 |
|
676 | 679 | Content-Length: 19 |
|
677 | 680 | Content-Type: text/plain; charset=utf-8 (git-server !) |
|
678 | 681 | Content-Type: application/octet-stream (hg-server !) |
|
679 | 682 | Date: $HTTP_DATE$ |
|
680 | 683 | Server: testing stub value (hg-server !) |
|
681 | 684 | lfs: adding d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 to the usercache |
|
682 | 685 | lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
683 | 686 | lfs: downloaded 2 files (31 bytes) |
|
684 | 687 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store |
|
685 | 688 | THIS-IS-LFS |
|
686 | 689 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store |
|
687 | 690 | THIS-IS-LFS |
|
688 | 691 | lfs: found d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 in the local lfs store |
|
689 | 692 | ANOTHER-LARGE-FILE |
|
690 | 693 | nonexistent: no such file in rev dfca2c9e2ef2 |
|
691 | 694 | |
|
692 | 695 | Revert will prefetch blobs in a group |
|
693 | 696 | |
|
694 | 697 | $ rm -rf .hg/store/lfs |
|
695 | 698 | $ rm -rf `hg config lfs.usercache` |
|
696 | 699 | $ rm * |
|
697 | 700 | $ hg revert --all -r 1 --debug |
|
698 | 701 | http auth: user foo, password *** |
|
699 | 702 | http auth: user foo, password *** |
|
700 | 703 | Status: 200 |
|
701 | 704 | Content-Length: 905 (git-server !) |
|
702 | 705 | Content-Length: 988 (hg-server !) |
|
703 | 706 | Content-Type: application/vnd.git-lfs+json |
|
704 | 707 | Date: $HTTP_DATE$ |
|
705 | 708 | Server: testing stub value (hg-server !) |
|
706 | 709 | { |
|
707 | 710 | "objects": [ |
|
708 | 711 | { |
|
709 | 712 | "actions": { |
|
710 | 713 | "download": { |
|
711 | 714 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
712 | 715 | "header": { |
|
713 | 716 | "Accept": "application/vnd.git-lfs" |
|
714 | 717 | } |
|
715 | 718 | "href": "http://localhost:$HGPORT/*/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" (glob) |
|
716 | 719 | } |
|
717 | 720 | } |
|
718 | 721 | "oid": "31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b" |
|
719 | 722 | "size": 12 |
|
720 | 723 | } |
|
721 | 724 | { |
|
722 | 725 | "actions": { |
|
723 | 726 | "download": { |
|
724 | 727 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
725 | 728 | "header": { |
|
726 | 729 | "Accept": "application/vnd.git-lfs" |
|
727 | 730 | } |
|
728 | 731 | "href": "http://localhost:$HGPORT/*/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19" (glob) |
|
729 | 732 | } |
|
730 | 733 | } |
|
731 | 734 | "oid": "37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19" |
|
732 | 735 | "size": 20 |
|
733 | 736 | } |
|
734 | 737 | { |
|
735 | 738 | "actions": { |
|
736 | 739 | "download": { |
|
737 | 740 | "expires_at": "$ISO_8601_DATE_TIME$" |
|
738 | 741 | "header": { |
|
739 | 742 | "Accept": "application/vnd.git-lfs" |
|
740 | 743 | } |
|
741 | 744 | "href": "http://localhost:$HGPORT/*/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" (glob) |
|
742 | 745 | } |
|
743 | 746 | } |
|
744 | 747 | "oid": "d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998" |
|
745 | 748 | "size": 19 |
|
746 | 749 | } |
|
747 | 750 | ] |
|
748 | 751 | "transfer": "basic" (hg-server !) |
|
749 | 752 | } |
|
750 | 753 | lfs: need to transfer 3 objects (51 bytes) |
|
751 | 754 | lfs: downloading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes) |
|
752 | 755 | Status: 200 |
|
753 | 756 | Content-Length: 12 |
|
754 | 757 | Content-Type: text/plain; charset=utf-8 (git-server !) |
|
755 | 758 | Content-Type: application/octet-stream (hg-server !) |
|
756 | 759 | Date: $HTTP_DATE$ |
|
757 | 760 | Server: testing stub value (hg-server !) |
|
758 | 761 | lfs: adding 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b to the usercache |
|
759 | 762 | lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b |
|
760 | 763 | lfs: downloading 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 (20 bytes) |
|
761 | 764 | Status: 200 |
|
762 | 765 | Content-Length: 20 |
|
763 | 766 | Content-Type: text/plain; charset=utf-8 (git-server !) |
|
764 | 767 | Content-Type: application/octet-stream (hg-server !) |
|
765 | 768 | Date: $HTTP_DATE$ |
|
766 | 769 | Server: testing stub value (hg-server !) |
|
767 | 770 | lfs: adding 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 to the usercache |
|
768 | 771 | lfs: processed: 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 |
|
769 | 772 | lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) |
|
770 | 773 | Status: 200 |
|
771 | 774 | Content-Length: 19 |
|
772 | 775 | Content-Type: text/plain; charset=utf-8 (git-server !) |
|
773 | 776 | Content-Type: application/octet-stream (hg-server !) |
|
774 | 777 | Date: $HTTP_DATE$ |
|
775 | 778 | Server: testing stub value (hg-server !) |
|
776 | 779 | lfs: adding d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 to the usercache |
|
777 | 780 | lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
778 | 781 | lfs: downloaded 3 files (51 bytes) |
|
779 | 782 | reverting b |
|
780 | 783 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store |
|
781 | 784 | reverting c |
|
782 | 785 | lfs: found d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 in the local lfs store |
|
783 | 786 | reverting d |
|
784 | 787 | lfs: found 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 in the local lfs store |
|
785 | 788 | adding a |
|
786 | 789 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store |
|
787 | 790 | |
|
788 | 791 | Check error message when the remote missed a blob: |
|
789 | 792 | |
|
790 | 793 | $ echo FFFFF > b |
|
791 | 794 | $ hg commit -m b -A b |
|
792 | 795 | $ echo FFFFF >> b |
|
793 | 796 | $ hg commit -m b b |
|
794 | 797 | $ rm -rf .hg/store/lfs |
|
795 | 798 | $ rm -rf `hg config lfs.usercache` |
|
796 | 799 | $ hg update -C '.^' --debug |
|
797 | 800 | http auth: user foo, password *** |
|
798 | 801 | resolving manifests |
|
799 | 802 | branchmerge: False, force: True, partial: False |
|
800 | 803 | ancestor: 62fdbaf221c6+, local: 62fdbaf221c6+, remote: ef0564edf47e |
|
801 | 804 | http auth: user foo, password *** |
|
802 | 805 | Status: 200 |
|
803 | 806 | Content-Length: 308 (git-server !) |
|
804 | 807 | Content-Length: 186 (hg-server !) |
|
805 | 808 | Content-Type: application/vnd.git-lfs+json |
|
806 | 809 | Date: $HTTP_DATE$ |
|
807 | 810 | Server: testing stub value (hg-server !) |
|
808 | 811 | { |
|
809 | 812 | "objects": [ |
|
810 | 813 | { |
|
811 | 814 | "actions": { (git-server !) |
|
812 | 815 | "upload": { (git-server !) |
|
813 | 816 | "expires_at": "$ISO_8601_DATE_TIME$" (git-server !) |
|
814 | 817 | "header": { (git-server !) |
|
815 | 818 | "Accept": "application/vnd.git-lfs" (git-server !) |
|
816 | 819 | } (git-server !) |
|
817 | 820 | "href": "http://localhost:$HGPORT/objects/8e6ea5f6c066b44a0efa43bcce86aea73f17e6e23f0663df0251e7524e140a13" (git-server !) |
|
818 | 821 | } (git-server !) |
|
819 | 822 | "error": { (hg-server !) |
|
820 | 823 | "code": 404 (hg-server !) |
|
821 | 824 | "message": "The object does not exist" (hg-server !) |
|
822 | 825 | } |
|
823 | 826 | "oid": "8e6ea5f6c066b44a0efa43bcce86aea73f17e6e23f0663df0251e7524e140a13" |
|
824 | 827 | "size": 6 |
|
825 | 828 | } |
|
826 | 829 | ] |
|
827 | 830 | "transfer": "basic" (hg-server !) |
|
828 | 831 | } |
|
829 | 832 | abort: LFS server error for "b": The object does not exist |
|
830 | 833 | [50] |
|
831 | 834 | |
|
832 | 835 | Check error message when object does not exist: |
|
833 | 836 | |
|
834 | 837 | $ cd $TESTTMP |
|
835 | 838 | $ hg init test && cd test |
|
836 | 839 | $ echo "[extensions]" >> .hg/hgrc |
|
837 | 840 | $ echo "lfs=" >> .hg/hgrc |
|
838 | 841 | $ echo "[lfs]" >> .hg/hgrc |
|
839 | 842 | $ echo "threshold=1" >> .hg/hgrc |
|
840 | 843 | $ echo a > a |
|
841 | 844 | $ hg add a |
|
842 | 845 | $ hg commit -m 'test' |
|
843 | 846 | $ echo aaaaa > a |
|
844 | 847 | $ hg commit -m 'largefile' |
|
845 | 848 | $ hg debugdata a 1 # verify this is no the file content but includes "oid", the LFS "pointer". |
|
846 | 849 | version https://git-lfs.github.com/spec/v1 |
|
847 | 850 | oid sha256:bdc26931acfb734b142a8d675f205becf27560dc461f501822de13274fe6fc8a |
|
848 | 851 | size 6 |
|
849 | 852 | x-is-binary 0 |
|
850 | 853 | $ cd .. |
|
851 | 854 | $ rm -rf `hg config lfs.usercache` |
|
852 | 855 | |
|
853 | 856 | (Restart the server in a different location so it no longer has the content) |
|
854 | 857 | |
|
855 | 858 | $ "$PYTHON" $RUNTESTDIR/killdaemons.py $DAEMON_PIDS |
|
856 | 859 | |
|
857 | 860 | #if hg-server |
|
858 | 861 | $ cat $TESTTMP/access.log $TESTTMP/errors.log |
|
859 | 862 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
860 | 863 | $LOCALIP - - [$LOGDATE$] "PUT /.hg/lfs/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b HTTP/1.1" 201 - (glob) |
|
861 | 864 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
862 | 865 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b HTTP/1.1" 200 - (glob) |
|
863 | 866 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
864 | 867 | $LOCALIP - - [$LOGDATE$] "PUT /.hg/lfs/objects/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 HTTP/1.1" 201 - (glob) |
|
865 | 868 | $LOCALIP - - [$LOGDATE$] "PUT /.hg/lfs/objects/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 HTTP/1.1" 201 - (glob) |
|
866 | 869 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
867 | 870 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 HTTP/1.1" 200 - (glob) |
|
868 | 871 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 HTTP/1.1" 200 - (glob) |
|
869 | 872 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
870 | 873 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
871 | 874 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
872 | 875 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b HTTP/1.1" 200 - (glob) |
|
873 | 876 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 HTTP/1.1" 200 - (glob) |
|
874 | 877 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 HTTP/1.1" 200 - (glob) |
|
875 | 878 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
876 | 879 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b HTTP/1.1" 200 - (glob) |
|
877 | 880 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 HTTP/1.1" 200 - (glob) |
|
878 | 881 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
879 | 882 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b HTTP/1.1" 200 - (glob) |
|
880 | 883 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 HTTP/1.1" 200 - (glob) |
|
881 | 884 | $LOCALIP - - [$LOGDATE$] "GET /.hg/lfs/objects/d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 HTTP/1.1" 200 - (glob) |
|
882 | 885 | $LOCALIP - - [$LOGDATE$] "POST /.git/info/lfs/objects/batch HTTP/1.1" 200 - (glob) |
|
883 | 886 | #endif |
|
884 | 887 | |
|
885 | 888 | $ mkdir $TESTTMP/lfs-server2 |
|
886 | 889 | $ cd $TESTTMP/lfs-server2 |
|
887 | 890 | #if no-windows git-server |
|
888 | 891 | $ lfs-test-server &> lfs-server.log & |
|
889 | 892 | $ echo $! >> $DAEMON_PIDS |
|
890 | 893 | #endif |
|
891 | 894 | |
|
892 | 895 | #if windows git-server |
|
893 | 896 | $ "$PYTHON" $TESTTMP/spawn.py >> $DAEMON_PIDS |
|
894 | 897 | #endif |
|
895 | 898 | |
|
896 | 899 | #if hg-server |
|
897 | 900 | $ hg init server2 |
|
898 | 901 | $ hg --config "lfs.usercache=$TESTTMP/servercache2" -R server2 serve -d \ |
|
899 | 902 | > -p $HGPORT --pid-file=hg.pid -A $TESTTMP/access.log -E $TESTTMP/errors.log |
|
900 | 903 | $ cat hg.pid >> $DAEMON_PIDS |
|
901 | 904 | #endif |
|
902 | 905 | |
|
903 | 906 | $ cd $TESTTMP |
|
904 | 907 | $ hg --debug clone test test2 |
|
905 | 908 | http auth: user foo, password *** |
|
906 | 909 | linked 6 files |
|
907 | 910 | http auth: user foo, password *** |
|
908 | 911 | updating to branch default |
|
909 | 912 | resolving manifests |
|
910 | 913 | branchmerge: False, force: False, partial: False |
|
911 | 914 | ancestor: 000000000000, local: 000000000000+, remote: d2a338f184a8 |
|
912 | 915 | http auth: user foo, password *** |
|
913 | 916 | Status: 200 |
|
914 | 917 | Content-Length: 308 (git-server !) |
|
915 | 918 | Content-Length: 186 (hg-server !) |
|
916 | 919 | Content-Type: application/vnd.git-lfs+json |
|
917 | 920 | Date: $HTTP_DATE$ |
|
918 | 921 | Server: testing stub value (hg-server !) |
|
919 | 922 | { |
|
920 | 923 | "objects": [ |
|
921 | 924 | { |
|
922 | 925 | "actions": { (git-server !) |
|
923 | 926 | "upload": { (git-server !) |
|
924 | 927 | "expires_at": "$ISO_8601_DATE_TIME$" (git-server !) |
|
925 | 928 | "header": { (git-server !) |
|
926 | 929 | "Accept": "application/vnd.git-lfs" (git-server !) |
|
927 | 930 | } (git-server !) |
|
928 | 931 | "href": "http://localhost:$HGPORT/objects/bdc26931acfb734b142a8d675f205becf27560dc461f501822de13274fe6fc8a" (git-server !) |
|
929 | 932 | } (git-server !) |
|
930 | 933 | "error": { (hg-server !) |
|
931 | 934 | "code": 404 (hg-server !) |
|
932 | 935 | "message": "The object does not exist" (hg-server !) |
|
933 | 936 | } |
|
934 | 937 | "oid": "bdc26931acfb734b142a8d675f205becf27560dc461f501822de13274fe6fc8a" |
|
935 | 938 | "size": 6 |
|
936 | 939 | } |
|
937 | 940 | ] |
|
938 | 941 | "transfer": "basic" (hg-server !) |
|
939 | 942 | } |
|
940 | 943 | abort: LFS server error for "a": The object does not exist |
|
941 | 944 | [50] |
|
942 | 945 | |
|
943 | 946 | $ "$PYTHON" $RUNTESTDIR/killdaemons.py $DAEMON_PIDS |
General Comments 0
You need to be logged in to leave comments.
Login now