Show More
@@ -1,273 +1,377 b'' | |||||
1 | #require lfs-test-server |
|
1 | #require lfs-test-server | |
2 |
|
2 | |||
3 | $ LFS_LISTEN="tcp://:$HGPORT" |
|
3 | $ LFS_LISTEN="tcp://:$HGPORT" | |
4 | $ LFS_HOST="localhost:$HGPORT" |
|
4 | $ LFS_HOST="localhost:$HGPORT" | |
5 | $ LFS_PUBLIC=1 |
|
5 | $ LFS_PUBLIC=1 | |
6 | $ export LFS_LISTEN LFS_HOST LFS_PUBLIC |
|
6 | $ export LFS_LISTEN LFS_HOST LFS_PUBLIC | |
7 | #if no-windows |
|
7 | #if no-windows | |
8 | $ lfs-test-server &> lfs-server.log & |
|
8 | $ lfs-test-server &> lfs-server.log & | |
9 | $ echo $! >> $DAEMON_PIDS |
|
9 | $ echo $! >> $DAEMON_PIDS | |
10 | #else |
|
10 | #else | |
11 | $ cat >> $TESTTMP/spawn.py <<EOF |
|
11 | $ cat >> $TESTTMP/spawn.py <<EOF | |
12 | > import os |
|
12 | > import os | |
13 | > import subprocess |
|
13 | > import subprocess | |
14 | > import sys |
|
14 | > import sys | |
15 | > |
|
15 | > | |
16 | > for path in os.environ["PATH"].split(os.pathsep): |
|
16 | > for path in os.environ["PATH"].split(os.pathsep): | |
17 | > exe = os.path.join(path, 'lfs-test-server.exe') |
|
17 | > exe = os.path.join(path, 'lfs-test-server.exe') | |
18 | > if os.path.exists(exe): |
|
18 | > if os.path.exists(exe): | |
19 | > with open('lfs-server.log', 'wb') as out: |
|
19 | > with open('lfs-server.log', 'wb') as out: | |
20 | > p = subprocess.Popen(exe, stdout=out, stderr=out) |
|
20 | > p = subprocess.Popen(exe, stdout=out, stderr=out) | |
21 | > sys.stdout.write('%s\n' % p.pid) |
|
21 | > sys.stdout.write('%s\n' % p.pid) | |
22 | > sys.exit(0) |
|
22 | > sys.exit(0) | |
23 | > sys.exit(1) |
|
23 | > sys.exit(1) | |
24 | > EOF |
|
24 | > EOF | |
25 | $ $PYTHON $TESTTMP/spawn.py >> $DAEMON_PIDS |
|
25 | $ $PYTHON $TESTTMP/spawn.py >> $DAEMON_PIDS | |
26 | #endif |
|
26 | #endif | |
27 |
|
27 | |||
28 | $ cat >> $HGRCPATH <<EOF |
|
28 | $ cat >> $HGRCPATH <<EOF | |
29 | > [extensions] |
|
29 | > [extensions] | |
30 | > lfs= |
|
30 | > lfs= | |
31 | > [lfs] |
|
31 | > [lfs] | |
32 | > url=http://foo:bar@$LFS_HOST/ |
|
32 | > url=http://foo:bar@$LFS_HOST/ | |
33 | > track=all() |
|
33 | > track=all() | |
34 | > EOF |
|
34 | > EOF | |
35 |
|
35 | |||
36 | $ hg init repo1 |
|
36 | $ hg init repo1 | |
37 | $ cd repo1 |
|
37 | $ cd repo1 | |
38 | $ echo THIS-IS-LFS > a |
|
38 | $ echo THIS-IS-LFS > a | |
39 | $ hg commit -m a -A a |
|
39 | $ hg commit -m a -A a | |
40 |
|
40 | |||
41 | A push can be serviced directly from the usercache if it isn't in the local |
|
41 | A push can be serviced directly from the usercache if it isn't in the local | |
42 | store. |
|
42 | store. | |
43 |
|
43 | |||
44 | $ hg init ../repo2 |
|
44 | $ hg init ../repo2 | |
45 | $ mv .hg/store/lfs .hg/store/lfs_ |
|
45 | $ mv .hg/store/lfs .hg/store/lfs_ | |
46 |
$ hg push ../repo2 - |
|
46 | $ hg push ../repo2 --debug | |
|
47 | http auth: user foo, password *** | |||
47 | pushing to ../repo2 |
|
48 | pushing to ../repo2 | |
|
49 | http auth: user foo, password *** | |||
|
50 | query 1; heads | |||
48 | searching for changes |
|
51 | searching for changes | |
|
52 | 1 total queries in *s (glob) | |||
|
53 | listing keys for "phases" | |||
|
54 | checking for updated bookmarks | |||
|
55 | listing keys for "bookmarks" | |||
|
56 | lfs: computing set of blobs to upload | |||
49 | lfs: uploading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes) |
|
57 | lfs: uploading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes) | |
50 | lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b |
|
58 | lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b | |
51 | lfs: uploaded 1 files (12 bytes) |
|
59 | lfs: uploaded 1 files (12 bytes) | |
52 | 1 changesets found |
|
60 | 1 changesets found | |
53 | uncompressed size of bundle content: |
|
61 | list of changesets: | |
54 | * (changelog) (glob) |
|
62 | 99a7098854a3984a5c9eab0fc7a2906697b7cb5c | |
55 | * (manifests) (glob) |
|
63 | bundle2-output-bundle: "HG20", 4 parts total | |
56 | * a (glob) |
|
64 | bundle2-output-part: "replycaps" 191 bytes payload | |
|
65 | bundle2-output-part: "check:heads" streamed payload | |||
|
66 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload | |||
|
67 | bundle2-output-part: "phase-heads" 24 bytes payload | |||
|
68 | bundle2-input-bundle: with-transaction | |||
|
69 | bundle2-input-part: "replycaps" supported | |||
|
70 | bundle2-input-part: total payload size 191 | |||
|
71 | bundle2-input-part: "check:heads" supported | |||
|
72 | bundle2-input-part: total payload size 20 | |||
|
73 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported | |||
57 | adding changesets |
|
74 | adding changesets | |
|
75 | add changeset 99a7098854a3 | |||
58 | adding manifests |
|
76 | adding manifests | |
59 | adding file changes |
|
77 | adding file changes | |
|
78 | adding a revisions | |||
60 | added 1 changesets with 1 changes to 1 files |
|
79 | added 1 changesets with 1 changes to 1 files | |
61 | calling hook pretxnchangegroup.lfs: hgext.lfs.checkrequireslfs |
|
80 | calling hook pretxnchangegroup.lfs: hgext.lfs.checkrequireslfs | |
|
81 | bundle2-input-part: total payload size 617 | |||
|
82 | bundle2-input-part: "phase-heads" supported | |||
|
83 | bundle2-input-part: total payload size 24 | |||
|
84 | bundle2-input-bundle: 3 parts total | |||
|
85 | updating the branch cache | |||
|
86 | bundle2-output-bundle: "HG20", 1 parts total | |||
|
87 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload | |||
|
88 | bundle2-input-bundle: no-transaction | |||
|
89 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported | |||
|
90 | bundle2-input-bundle: 0 parts total | |||
|
91 | listing keys for "phases" | |||
62 | $ mv .hg/store/lfs_ .hg/store/lfs |
|
92 | $ mv .hg/store/lfs_ .hg/store/lfs | |
63 |
|
93 | |||
64 | Clear the cache to force a download |
|
94 | Clear the cache to force a download | |
65 | $ rm -rf `hg config lfs.usercache` |
|
95 | $ rm -rf `hg config lfs.usercache` | |
66 | $ cd ../repo2 |
|
96 | $ cd ../repo2 | |
67 |
$ hg update tip - |
|
97 | $ hg update tip --debug | |
|
98 | http auth: user foo, password *** | |||
68 | resolving manifests |
|
99 | resolving manifests | |
|
100 | branchmerge: False, force: False, partial: False | |||
|
101 | ancestor: 000000000000, local: 000000000000+, remote: 99a7098854a3 | |||
69 | lfs: downloading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes) |
|
102 | lfs: downloading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes) | |
70 | lfs: adding 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b to the usercache |
|
103 | lfs: adding 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b to the usercache | |
71 | lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b |
|
104 | lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b | |
|
105 | a: remote created -> g | |||
72 | getting a |
|
106 | getting a | |
73 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store |
|
107 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store | |
74 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
108 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
75 |
|
109 | |||
76 | When the server has some blobs already |
|
110 | When the server has some blobs already | |
77 |
|
111 | |||
78 | $ hg mv a b |
|
112 | $ hg mv a b | |
79 | $ echo ANOTHER-LARGE-FILE > c |
|
113 | $ echo ANOTHER-LARGE-FILE > c | |
80 | $ echo ANOTHER-LARGE-FILE2 > d |
|
114 | $ echo ANOTHER-LARGE-FILE2 > d | |
81 | $ hg commit -m b-and-c -A b c d |
|
115 | $ hg commit -m b-and-c -A b c d | |
82 |
$ hg push ../repo1 - |
|
116 | $ hg push ../repo1 --debug | |
|
117 | http auth: user foo, password *** | |||
83 | pushing to ../repo1 |
|
118 | pushing to ../repo1 | |
|
119 | http auth: user foo, password *** | |||
|
120 | query 1; heads | |||
84 | searching for changes |
|
121 | searching for changes | |
|
122 | all remote heads known locally | |||
|
123 | listing keys for "phases" | |||
|
124 | checking for updated bookmarks | |||
|
125 | listing keys for "bookmarks" | |||
|
126 | listing keys for "bookmarks" | |||
|
127 | lfs: computing set of blobs to upload | |||
85 | lfs: need to transfer 2 objects (39 bytes) |
|
128 | lfs: need to transfer 2 objects (39 bytes) | |
86 | lfs: uploading 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 (20 bytes) |
|
129 | lfs: uploading 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 (20 bytes) | |
87 | lfs: processed: 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 |
|
130 | lfs: processed: 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 | |
88 | lfs: uploading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) |
|
131 | lfs: uploading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) | |
89 | lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
132 | lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 | |
90 | lfs: uploaded 2 files (39 bytes) |
|
133 | lfs: uploaded 2 files (39 bytes) | |
91 | 1 changesets found |
|
134 | 1 changesets found | |
92 | uncompressed size of bundle content: |
|
135 | list of changesets: | |
|
136 | dfca2c9e2ef24996aa61ba2abd99277d884b3d63 | |||
|
137 | bundle2-output-bundle: "HG20", 5 parts total | |||
|
138 | bundle2-output-part: "replycaps" 191 bytes payload | |||
|
139 | bundle2-output-part: "check:phases" 24 bytes payload | |||
|
140 | bundle2-output-part: "check:heads" streamed payload | |||
|
141 | bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload | |||
|
142 | bundle2-output-part: "phase-heads" 24 bytes payload | |||
|
143 | bundle2-input-bundle: with-transaction | |||
|
144 | bundle2-input-part: "replycaps" supported | |||
|
145 | bundle2-input-part: total payload size 191 | |||
|
146 | bundle2-input-part: "check:phases" supported | |||
|
147 | bundle2-input-part: total payload size 24 | |||
|
148 | bundle2-input-part: "check:heads" supported | |||
|
149 | bundle2-input-part: total payload size 20 | |||
|
150 | bundle2-input-part: "changegroup" (params: 1 mandatory) supported | |||
93 | adding changesets |
|
151 | adding changesets | |
|
152 | add changeset dfca2c9e2ef2 | |||
94 | adding manifests |
|
153 | adding manifests | |
95 | adding file changes |
|
154 | adding file changes | |
|
155 | adding b revisions | |||
|
156 | adding c revisions | |||
|
157 | adding d revisions | |||
96 | added 1 changesets with 3 changes to 3 files |
|
158 | added 1 changesets with 3 changes to 3 files | |
|
159 | bundle2-input-part: total payload size 1315 | |||
|
160 | bundle2-input-part: "phase-heads" supported | |||
|
161 | bundle2-input-part: total payload size 24 | |||
|
162 | bundle2-input-bundle: 4 parts total | |||
|
163 | updating the branch cache | |||
|
164 | bundle2-output-bundle: "HG20", 1 parts total | |||
|
165 | bundle2-output-part: "reply:changegroup" (advisory) (params: 0 advisory) empty payload | |||
|
166 | bundle2-input-bundle: no-transaction | |||
|
167 | bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported | |||
|
168 | bundle2-input-bundle: 0 parts total | |||
|
169 | listing keys for "phases" | |||
97 |
|
170 | |||
98 | Clear the cache to force a download |
|
171 | Clear the cache to force a download | |
99 | $ rm -rf `hg config lfs.usercache` |
|
172 | $ rm -rf `hg config lfs.usercache` | |
100 |
$ hg --repo ../repo1 update tip - |
|
173 | $ hg --repo ../repo1 update tip --debug | |
|
174 | http auth: user foo, password *** | |||
101 | resolving manifests |
|
175 | resolving manifests | |
|
176 | branchmerge: False, force: False, partial: False | |||
|
177 | ancestor: 99a7098854a3, local: 99a7098854a3+, remote: dfca2c9e2ef2 | |||
102 | lfs: need to transfer 2 objects (39 bytes) |
|
178 | lfs: need to transfer 2 objects (39 bytes) | |
103 | lfs: downloading 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 (20 bytes) |
|
179 | lfs: downloading 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 (20 bytes) | |
104 | lfs: adding 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 to the usercache |
|
180 | lfs: adding 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 to the usercache | |
105 | lfs: processed: 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 |
|
181 | lfs: processed: 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 | |
106 | lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) |
|
182 | lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) | |
107 | lfs: adding d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 to the usercache |
|
183 | lfs: adding d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 to the usercache | |
108 | lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
184 | lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 | |
|
185 | b: remote created -> g | |||
109 | getting b |
|
186 | getting b | |
110 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store |
|
187 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store | |
|
188 | c: remote created -> g | |||
111 | getting c |
|
189 | getting c | |
112 | lfs: found d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 in the local lfs store |
|
190 | lfs: found d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 in the local lfs store | |
|
191 | d: remote created -> g | |||
113 | getting d |
|
192 | getting d | |
114 | lfs: found 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 in the local lfs store |
|
193 | lfs: found 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 in the local lfs store | |
115 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
194 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
116 |
|
195 | |||
117 | Test a corrupt file download, but clear the cache first to force a download. |
|
196 | Test a corrupt file download, but clear the cache first to force a download. | |
118 |
|
197 | |||
119 | $ rm -rf `hg config lfs.usercache` |
|
198 | $ rm -rf `hg config lfs.usercache` | |
120 | $ cp $TESTTMP/lfs-content/d1/1e/1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 blob |
|
199 | $ cp $TESTTMP/lfs-content/d1/1e/1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 blob | |
121 | $ echo 'damage' > $TESTTMP/lfs-content/d1/1e/1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
200 | $ echo 'damage' > $TESTTMP/lfs-content/d1/1e/1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 | |
122 | $ rm ../repo1/.hg/store/lfs/objects/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
201 | $ rm ../repo1/.hg/store/lfs/objects/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 | |
123 | $ rm ../repo1/* |
|
202 | $ rm ../repo1/* | |
124 |
|
203 | |||
125 |
$ hg --repo ../repo1 update -C tip - |
|
204 | $ hg --repo ../repo1 update -C tip --debug | |
|
205 | http auth: user foo, password *** | |||
126 | resolving manifests |
|
206 | resolving manifests | |
|
207 | branchmerge: False, force: True, partial: False | |||
|
208 | ancestor: dfca2c9e2ef2+, local: dfca2c9e2ef2+, remote: dfca2c9e2ef2 | |||
127 | lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) |
|
209 | lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) | |
128 | abort: corrupt remote lfs object: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
210 | abort: corrupt remote lfs object: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 | |
129 | [255] |
|
211 | [255] | |
130 |
|
212 | |||
131 | The corrupted blob is not added to the usercache or local store |
|
213 | The corrupted blob is not added to the usercache or local store | |
132 |
|
214 | |||
133 | $ test -f ../repo1/.hg/store/lfs/objects/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
215 | $ test -f ../repo1/.hg/store/lfs/objects/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 | |
134 | [1] |
|
216 | [1] | |
135 | $ test -f `hg config lfs.usercache`/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
217 | $ test -f `hg config lfs.usercache`/d1/1e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 | |
136 | [1] |
|
218 | [1] | |
137 | $ cp blob $TESTTMP/lfs-content/d1/1e/1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
219 | $ cp blob $TESTTMP/lfs-content/d1/1e/1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 | |
138 |
|
220 | |||
139 | Test a corrupted file upload |
|
221 | Test a corrupted file upload | |
140 |
|
222 | |||
141 | $ echo 'another lfs blob' > b |
|
223 | $ echo 'another lfs blob' > b | |
142 | $ hg ci -m 'another blob' |
|
224 | $ hg ci -m 'another blob' | |
143 | $ echo 'damage' > .hg/store/lfs/objects/e6/59058e26b07b39d2a9c7145b3f99b41f797b6621c8076600e9cb7ee88291f0 |
|
225 | $ echo 'damage' > .hg/store/lfs/objects/e6/59058e26b07b39d2a9c7145b3f99b41f797b6621c8076600e9cb7ee88291f0 | |
144 |
$ hg push - |
|
226 | $ hg push --debug ../repo1 | |
|
227 | http auth: user foo, password *** | |||
145 | pushing to ../repo1 |
|
228 | pushing to ../repo1 | |
|
229 | http auth: user foo, password *** | |||
|
230 | query 1; heads | |||
146 | searching for changes |
|
231 | searching for changes | |
|
232 | all remote heads known locally | |||
|
233 | listing keys for "phases" | |||
|
234 | checking for updated bookmarks | |||
|
235 | listing keys for "bookmarks" | |||
|
236 | listing keys for "bookmarks" | |||
|
237 | lfs: computing set of blobs to upload | |||
147 | lfs: uploading e659058e26b07b39d2a9c7145b3f99b41f797b6621c8076600e9cb7ee88291f0 (17 bytes) |
|
238 | lfs: uploading e659058e26b07b39d2a9c7145b3f99b41f797b6621c8076600e9cb7ee88291f0 (17 bytes) | |
148 | abort: detected corrupt lfs object: e659058e26b07b39d2a9c7145b3f99b41f797b6621c8076600e9cb7ee88291f0 |
|
239 | abort: detected corrupt lfs object: e659058e26b07b39d2a9c7145b3f99b41f797b6621c8076600e9cb7ee88291f0 | |
149 | (run hg verify) |
|
240 | (run hg verify) | |
150 | [255] |
|
241 | [255] | |
151 |
|
242 | |||
152 | Archive will prefetch blobs in a group |
|
243 | Archive will prefetch blobs in a group | |
153 |
|
244 | |||
154 | $ rm -rf .hg/store/lfs `hg config lfs.usercache` |
|
245 | $ rm -rf .hg/store/lfs `hg config lfs.usercache` | |
155 |
$ hg archive - |
|
246 | $ hg archive --debug -r 1 ../archive | |
|
247 | http auth: user foo, password *** | |||
156 | lfs: need to transfer 3 objects (51 bytes) |
|
248 | lfs: need to transfer 3 objects (51 bytes) | |
157 | lfs: downloading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes) |
|
249 | lfs: downloading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes) | |
158 | lfs: adding 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b to the usercache |
|
250 | lfs: adding 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b to the usercache | |
159 | lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b |
|
251 | lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b | |
160 | lfs: downloading 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 (20 bytes) |
|
252 | lfs: downloading 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 (20 bytes) | |
161 | lfs: adding 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 to the usercache |
|
253 | lfs: adding 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 to the usercache | |
162 | lfs: processed: 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 |
|
254 | lfs: processed: 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 | |
163 | lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) |
|
255 | lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) | |
164 | lfs: adding d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 to the usercache |
|
256 | lfs: adding d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 to the usercache | |
165 | lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
257 | lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 | |
166 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store |
|
258 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store | |
167 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store |
|
259 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store | |
168 | lfs: found d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 in the local lfs store |
|
260 | lfs: found d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 in the local lfs store | |
169 | lfs: found 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 in the local lfs store |
|
261 | lfs: found 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 in the local lfs store | |
170 | $ find ../archive | sort |
|
262 | $ find ../archive | sort | |
171 | ../archive |
|
263 | ../archive | |
172 | ../archive/.hg_archival.txt |
|
264 | ../archive/.hg_archival.txt | |
173 | ../archive/a |
|
265 | ../archive/a | |
174 | ../archive/b |
|
266 | ../archive/b | |
175 | ../archive/c |
|
267 | ../archive/c | |
176 | ../archive/d |
|
268 | ../archive/d | |
177 |
|
269 | |||
178 | Cat will prefetch blobs in a group |
|
270 | Cat will prefetch blobs in a group | |
179 |
|
271 | |||
180 | $ rm -rf .hg/store/lfs `hg config lfs.usercache` |
|
272 | $ rm -rf .hg/store/lfs `hg config lfs.usercache` | |
181 |
$ hg cat - |
|
273 | $ hg cat --debug -r 1 a b c | |
|
274 | http auth: user foo, password *** | |||
182 | lfs: need to transfer 2 objects (31 bytes) |
|
275 | lfs: need to transfer 2 objects (31 bytes) | |
183 | lfs: downloading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes) |
|
276 | lfs: downloading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes) | |
184 | lfs: adding 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b to the usercache |
|
277 | lfs: adding 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b to the usercache | |
185 | lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b |
|
278 | lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b | |
186 | lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) |
|
279 | lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) | |
187 | lfs: adding d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 to the usercache |
|
280 | lfs: adding d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 to the usercache | |
188 | lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
281 | lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 | |
189 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store |
|
282 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store | |
190 | THIS-IS-LFS |
|
283 | THIS-IS-LFS | |
191 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store |
|
284 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store | |
192 | THIS-IS-LFS |
|
285 | THIS-IS-LFS | |
193 | lfs: found d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 in the local lfs store |
|
286 | lfs: found d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 in the local lfs store | |
194 | ANOTHER-LARGE-FILE |
|
287 | ANOTHER-LARGE-FILE | |
195 |
|
288 | |||
196 | Revert will prefetch blobs in a group |
|
289 | Revert will prefetch blobs in a group | |
197 |
|
290 | |||
198 | $ rm -rf .hg/store/lfs |
|
291 | $ rm -rf .hg/store/lfs | |
199 | $ rm -rf `hg config lfs.usercache` |
|
292 | $ rm -rf `hg config lfs.usercache` | |
200 | $ rm * |
|
293 | $ rm * | |
201 |
$ hg revert --all -r 1 - |
|
294 | $ hg revert --all -r 1 --debug | |
|
295 | http auth: user foo, password *** | |||
202 | adding a |
|
296 | adding a | |
203 | reverting b |
|
297 | reverting b | |
204 | reverting c |
|
298 | reverting c | |
205 | reverting d |
|
299 | reverting d | |
206 | lfs: need to transfer 3 objects (51 bytes) |
|
300 | lfs: need to transfer 3 objects (51 bytes) | |
207 | lfs: downloading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes) |
|
301 | lfs: downloading 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b (12 bytes) | |
208 | lfs: adding 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b to the usercache |
|
302 | lfs: adding 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b to the usercache | |
209 | lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b |
|
303 | lfs: processed: 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b | |
210 | lfs: downloading 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 (20 bytes) |
|
304 | lfs: downloading 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 (20 bytes) | |
211 | lfs: adding 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 to the usercache |
|
305 | lfs: adding 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 to the usercache | |
212 | lfs: processed: 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 |
|
306 | lfs: processed: 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 | |
213 | lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) |
|
307 | lfs: downloading d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 (19 bytes) | |
214 | lfs: adding d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 to the usercache |
|
308 | lfs: adding d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 to the usercache | |
215 | lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 |
|
309 | lfs: processed: d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 | |
216 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store |
|
310 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store | |
217 | lfs: found d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 in the local lfs store |
|
311 | lfs: found d11e1a642b60813aee592094109b406089b8dff4cb157157f753418ec7857998 in the local lfs store | |
218 | lfs: found 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 in the local lfs store |
|
312 | lfs: found 37a65ab78d5ecda767e8622c248b5dbff1e68b1678ab0e730d5eb8601ec8ad19 in the local lfs store | |
219 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store |
|
313 | lfs: found 31cf46fbc4ecd458a0943c5b4881f1f5a6dd36c53d6167d5b69ac45149b38e5b in the local lfs store | |
220 |
|
314 | |||
221 | Check error message when the remote missed a blob: |
|
315 | Check error message when the remote missed a blob: | |
222 |
|
316 | |||
223 | $ echo FFFFF > b |
|
317 | $ echo FFFFF > b | |
224 | $ hg commit -m b -A b |
|
318 | $ hg commit -m b -A b | |
225 | $ echo FFFFF >> b |
|
319 | $ echo FFFFF >> b | |
226 | $ hg commit -m b b |
|
320 | $ hg commit -m b b | |
227 | $ rm -rf .hg/store/lfs |
|
321 | $ rm -rf .hg/store/lfs | |
228 | $ rm -rf `hg config lfs.usercache` |
|
322 | $ rm -rf `hg config lfs.usercache` | |
229 | $ hg update -C '.^' |
|
323 | $ hg update -C '.^' --debug | |
|
324 | http auth: user foo, password *** | |||
|
325 | resolving manifests | |||
|
326 | branchmerge: False, force: True, partial: False | |||
|
327 | ancestor: 62fdbaf221c6+, local: 62fdbaf221c6+, remote: ef0564edf47e | |||
230 | abort: LFS server error. Remote object for "b" not found:(.*)! (re) |
|
328 | abort: LFS server error. Remote object for "b" not found:(.*)! (re) | |
231 | [255] |
|
329 | [255] | |
232 |
|
330 | |||
233 | Check error message when object does not exist: |
|
331 | Check error message when object does not exist: | |
234 |
|
332 | |||
235 | $ cd $TESTTMP |
|
333 | $ cd $TESTTMP | |
236 | $ hg init test && cd test |
|
334 | $ hg init test && cd test | |
237 | $ echo "[extensions]" >> .hg/hgrc |
|
335 | $ echo "[extensions]" >> .hg/hgrc | |
238 | $ echo "lfs=" >> .hg/hgrc |
|
336 | $ echo "lfs=" >> .hg/hgrc | |
239 | $ echo "[lfs]" >> .hg/hgrc |
|
337 | $ echo "[lfs]" >> .hg/hgrc | |
240 | $ echo "threshold=1" >> .hg/hgrc |
|
338 | $ echo "threshold=1" >> .hg/hgrc | |
241 | $ echo a > a |
|
339 | $ echo a > a | |
242 | $ hg add a |
|
340 | $ hg add a | |
243 | $ hg commit -m 'test' |
|
341 | $ hg commit -m 'test' | |
244 | $ echo aaaaa > a |
|
342 | $ echo aaaaa > a | |
245 | $ hg commit -m 'largefile' |
|
343 | $ hg commit -m 'largefile' | |
246 | $ hg debugdata .hg/store/data/a.i 1 # verify this is no the file content but includes "oid", the LFS "pointer". |
|
344 | $ hg debugdata .hg/store/data/a.i 1 # verify this is no the file content but includes "oid", the LFS "pointer". | |
247 | version https://git-lfs.github.com/spec/v1 |
|
345 | version https://git-lfs.github.com/spec/v1 | |
248 | oid sha256:bdc26931acfb734b142a8d675f205becf27560dc461f501822de13274fe6fc8a |
|
346 | oid sha256:bdc26931acfb734b142a8d675f205becf27560dc461f501822de13274fe6fc8a | |
249 | size 6 |
|
347 | size 6 | |
250 | x-is-binary 0 |
|
348 | x-is-binary 0 | |
251 | $ cd .. |
|
349 | $ cd .. | |
252 | $ rm -rf `hg config lfs.usercache` |
|
350 | $ rm -rf `hg config lfs.usercache` | |
253 |
|
351 | |||
254 | (Restart the server in a different location so it no longer has the content) |
|
352 | (Restart the server in a different location so it no longer has the content) | |
255 |
|
353 | |||
256 | $ $PYTHON $RUNTESTDIR/killdaemons.py $DAEMON_PIDS |
|
354 | $ $PYTHON $RUNTESTDIR/killdaemons.py $DAEMON_PIDS | |
257 | $ rm $DAEMON_PIDS |
|
355 | $ rm $DAEMON_PIDS | |
258 | $ mkdir $TESTTMP/lfs-server2 |
|
356 | $ mkdir $TESTTMP/lfs-server2 | |
259 | $ cd $TESTTMP/lfs-server2 |
|
357 | $ cd $TESTTMP/lfs-server2 | |
260 | #if no-windows |
|
358 | #if no-windows | |
261 | $ lfs-test-server &> lfs-server.log & |
|
359 | $ lfs-test-server &> lfs-server.log & | |
262 | $ echo $! >> $DAEMON_PIDS |
|
360 | $ echo $! >> $DAEMON_PIDS | |
263 | #else |
|
361 | #else | |
264 | $ $PYTHON $TESTTMP/spawn.py >> $DAEMON_PIDS |
|
362 | $ $PYTHON $TESTTMP/spawn.py >> $DAEMON_PIDS | |
265 | #endif |
|
363 | #endif | |
266 |
|
364 | |||
267 | $ cd $TESTTMP |
|
365 | $ cd $TESTTMP | |
268 | $ hg clone test test2 |
|
366 | $ hg --debug clone test test2 | |
|
367 | http auth: user foo, password *** | |||
|
368 | linked 6 files | |||
|
369 | http auth: user foo, password *** | |||
269 | updating to branch default |
|
370 | updating to branch default | |
|
371 | resolving manifests | |||
|
372 | branchmerge: False, force: False, partial: False | |||
|
373 | ancestor: 000000000000, local: 000000000000+, remote: d2a338f184a8 | |||
270 | abort: LFS server error. Remote object for "a" not found:(.*)! (re) |
|
374 | abort: LFS server error. Remote object for "a" not found:(.*)! (re) | |
271 | [255] |
|
375 | [255] | |
272 |
|
376 | |||
273 | $ $PYTHON $RUNTESTDIR/killdaemons.py $DAEMON_PIDS |
|
377 | $ $PYTHON $RUNTESTDIR/killdaemons.py $DAEMON_PIDS |
General Comments 0
You need to be logged in to leave comments.
Login now