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