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