Show More
@@ -1,1231 +1,1237 | |||||
1 | #require no-reposimplestore no-chg |
|
1 | #require no-reposimplestore no-chg | |
2 |
|
2 | |||
3 | $ hg init requirements |
|
3 | $ hg init requirements | |
4 | $ cd requirements |
|
4 | $ cd requirements | |
5 |
|
5 | |||
6 | # LFS not loaded by default. |
|
6 | # LFS not loaded by default. | |
7 |
|
7 | |||
8 | $ hg config extensions |
|
8 | $ hg config extensions | |
9 | [1] |
|
9 | [1] | |
10 |
|
10 | |||
11 | # Adding lfs to requires file will auto-load lfs extension. |
|
11 | # Adding lfs to requires file will auto-load lfs extension. | |
12 |
|
12 | |||
13 | $ echo lfs >> .hg/requires |
|
13 | $ echo lfs >> .hg/requires | |
14 | $ hg config extensions |
|
14 | $ hg config extensions | |
15 | extensions.lfs= |
|
15 | extensions.lfs= | |
16 |
|
16 | |||
17 | # But only if there is no config entry for the extension already. |
|
17 | # But only if there is no config entry for the extension already. | |
18 |
|
18 | |||
19 | $ cat > .hg/hgrc << EOF |
|
19 | $ cat > .hg/hgrc << EOF | |
20 | > [extensions] |
|
20 | > [extensions] | |
21 | > lfs=! |
|
21 | > lfs=! | |
22 | > EOF |
|
22 | > EOF | |
23 |
|
23 | |||
24 | $ hg config extensions |
|
24 | $ hg config extensions | |
25 | abort: repository requires features unknown to this Mercurial: lfs! |
|
25 | abort: repository requires features unknown to this Mercurial: lfs! | |
26 | (see https://mercurial-scm.org/wiki/MissingRequirement for more information) |
|
26 | (see https://mercurial-scm.org/wiki/MissingRequirement for more information) | |
27 | [255] |
|
27 | [255] | |
28 |
|
28 | |||
29 | $ cat > .hg/hgrc << EOF |
|
29 | $ cat > .hg/hgrc << EOF | |
30 | > [extensions] |
|
30 | > [extensions] | |
31 | > lfs= |
|
31 | > lfs= | |
32 | > EOF |
|
32 | > EOF | |
33 |
|
33 | |||
34 | $ hg config extensions |
|
34 | $ hg config extensions | |
35 | extensions.lfs= |
|
35 | extensions.lfs= | |
36 |
|
36 | |||
37 | $ cat > .hg/hgrc << EOF |
|
37 | $ cat > .hg/hgrc << EOF | |
38 | > [extensions] |
|
38 | > [extensions] | |
39 | > lfs = missing.py |
|
39 | > lfs = missing.py | |
40 | > EOF |
|
40 | > EOF | |
41 |
|
41 | |||
42 | $ hg config extensions |
|
42 | $ hg config extensions | |
43 | \*\*\* failed to import extension lfs from missing.py: [Errno *] $ENOENT$: 'missing.py' (glob) |
|
43 | \*\*\* failed to import extension lfs from missing.py: [Errno *] $ENOENT$: 'missing.py' (glob) | |
44 | abort: repository requires features unknown to this Mercurial: lfs! |
|
44 | abort: repository requires features unknown to this Mercurial: lfs! | |
45 | (see https://mercurial-scm.org/wiki/MissingRequirement for more information) |
|
45 | (see https://mercurial-scm.org/wiki/MissingRequirement for more information) | |
46 | [255] |
|
46 | [255] | |
47 |
|
47 | |||
48 | $ cd .. |
|
48 | $ cd .. | |
49 |
|
49 | |||
50 | # Initial setup |
|
50 | # Initial setup | |
51 |
|
51 | |||
52 | $ cat >> $HGRCPATH << EOF |
|
52 | $ cat >> $HGRCPATH << EOF | |
53 | > [extensions] |
|
53 | > [extensions] | |
54 | > lfs= |
|
54 | > lfs= | |
55 | > [lfs] |
|
55 | > [lfs] | |
56 | > # Test deprecated config |
|
56 | > # Test deprecated config | |
57 | > threshold=1000B |
|
57 | > threshold=1000B | |
58 | > EOF |
|
58 | > EOF | |
59 |
|
59 | |||
60 | $ LONG=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC | |
61 |
|
61 | |||
62 | # Prepare server and enable extension |
|
62 | # Prepare server and enable extension | |
63 | $ hg init server |
|
63 | $ hg init server | |
64 | $ hg clone -q server client |
|
64 | $ hg clone -q server client | |
65 | $ cd client |
|
65 | $ cd client | |
66 |
|
66 | |||
67 | # Commit small file |
|
67 | # Commit small file | |
68 | $ echo s > smallfile |
|
68 | $ echo s > smallfile | |
69 | $ echo '**.py = LF' > .hgeol |
|
69 | $ echo '**.py = LF' > .hgeol | |
70 | $ hg --config lfs.track='"size(\">1000B\")"' commit -Aqm "add small file" |
|
70 | $ hg --config lfs.track='"size(\">1000B\")"' commit -Aqm "add small file" | |
71 | hg: parse error: unsupported file pattern: size(">1000B") |
|
71 | hg: parse error: unsupported file pattern: size(">1000B") | |
72 | (paths must be prefixed with "path:") |
|
72 | (paths must be prefixed with "path:") | |
73 | [255] |
|
73 | [255] | |
74 | $ hg --config lfs.track='size(">1000B")' commit -Aqm "add small file" |
|
74 | $ hg --config lfs.track='size(">1000B")' commit -Aqm "add small file" | |
75 |
|
75 | |||
76 | # Commit large file |
|
76 | # Commit large file | |
77 | $ echo $LONG > largefile |
|
77 | $ echo $LONG > largefile | |
78 | $ grep lfs .hg/requires |
|
78 | $ grep lfs .hg/requires | |
79 | [1] |
|
79 | [1] | |
80 | $ hg commit --traceback -Aqm "add large file" |
|
80 | $ hg commit --traceback -Aqm "add large file" | |
81 | $ grep lfs .hg/requires |
|
81 | $ grep lfs .hg/requires | |
82 | lfs |
|
82 | lfs | |
83 |
|
83 | |||
84 | # Ensure metadata is stored |
|
84 | # Ensure metadata is stored | |
85 | $ hg debugdata largefile 0 |
|
85 | $ hg debugdata largefile 0 | |
86 | version https://git-lfs.github.com/spec/v1 |
|
86 | version https://git-lfs.github.com/spec/v1 | |
87 | oid sha256:f11e77c257047a398492d8d6cb9f6acf3aa7c4384bb23080b43546053e183e4b |
|
87 | oid sha256:f11e77c257047a398492d8d6cb9f6acf3aa7c4384bb23080b43546053e183e4b | |
88 | size 1501 |
|
88 | size 1501 | |
89 | x-is-binary 0 |
|
89 | x-is-binary 0 | |
90 |
|
90 | |||
91 | # Check the blobstore is populated |
|
91 | # Check the blobstore is populated | |
92 | $ find .hg/store/lfs/objects | sort |
|
92 | $ find .hg/store/lfs/objects | sort | |
93 | .hg/store/lfs/objects |
|
93 | .hg/store/lfs/objects | |
94 | .hg/store/lfs/objects/f1 |
|
94 | .hg/store/lfs/objects/f1 | |
95 | .hg/store/lfs/objects/f1/1e77c257047a398492d8d6cb9f6acf3aa7c4384bb23080b43546053e183e4b |
|
95 | .hg/store/lfs/objects/f1/1e77c257047a398492d8d6cb9f6acf3aa7c4384bb23080b43546053e183e4b | |
96 |
|
96 | |||
97 | # Check the blob stored contains the actual contents of the file |
|
97 | # Check the blob stored contains the actual contents of the file | |
98 | $ cat .hg/store/lfs/objects/f1/1e77c257047a398492d8d6cb9f6acf3aa7c4384bb23080b43546053e183e4b |
|
98 | $ cat .hg/store/lfs/objects/f1/1e77c257047a398492d8d6cb9f6acf3aa7c4384bb23080b43546053e183e4b | |
99 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB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CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC | |
100 |
|
100 | |||
101 | # Push changes to the server |
|
101 | # Push changes to the server | |
102 |
|
102 | |||
103 | $ hg push |
|
103 | $ hg push | |
104 | pushing to $TESTTMP/server |
|
104 | pushing to $TESTTMP/server | |
105 | searching for changes |
|
105 | searching for changes | |
106 | abort: lfs.url needs to be configured |
|
106 | abort: lfs.url needs to be configured | |
107 | [255] |
|
107 | [255] | |
108 |
|
108 | |||
109 | $ cat >> $HGRCPATH << EOF |
|
109 | $ cat >> $HGRCPATH << EOF | |
110 | > [lfs] |
|
110 | > [lfs] | |
111 | > url=file:$TESTTMP/dummy-remote/ |
|
111 | > url=file:$TESTTMP/dummy-remote/ | |
112 | > EOF |
|
112 | > EOF | |
113 |
|
113 | |||
114 | Push to a local non-lfs repo with the extension enabled will add the |
|
114 | Push to a local non-lfs repo with the extension enabled will add the | |
115 | lfs requirement |
|
115 | lfs requirement | |
116 |
|
116 | |||
117 | $ grep lfs $TESTTMP/server/.hg/requires |
|
117 | $ grep lfs $TESTTMP/server/.hg/requires | |
118 | [1] |
|
118 | [1] | |
119 | $ hg push -v | egrep -v '^(uncompressed| )' |
|
119 | $ hg push -v | egrep -v '^(uncompressed| )' | |
120 | pushing to $TESTTMP/server |
|
120 | pushing to $TESTTMP/server | |
121 | searching for changes |
|
121 | searching for changes | |
122 | lfs: found f11e77c257047a398492d8d6cb9f6acf3aa7c4384bb23080b43546053e183e4b in the local lfs store |
|
122 | lfs: found f11e77c257047a398492d8d6cb9f6acf3aa7c4384bb23080b43546053e183e4b in the local lfs store | |
123 | 2 changesets found |
|
123 | 2 changesets found | |
124 | adding changesets |
|
124 | adding changesets | |
125 | adding manifests |
|
125 | adding manifests | |
126 | adding file changes |
|
126 | adding file changes | |
127 | calling hook pretxnchangegroup.lfs: hgext.lfs.checkrequireslfs |
|
127 | calling hook pretxnchangegroup.lfs: hgext.lfs.checkrequireslfs | |
128 | added 2 changesets with 3 changes to 3 files |
|
128 | added 2 changesets with 3 changes to 3 files | |
129 | $ grep lfs $TESTTMP/server/.hg/requires |
|
129 | $ grep lfs $TESTTMP/server/.hg/requires | |
130 | lfs |
|
130 | lfs | |
131 |
|
131 | |||
132 | # Unknown URL scheme |
|
132 | # Unknown URL scheme | |
133 |
|
133 | |||
134 | $ hg push --config lfs.url=ftp://foobar |
|
134 | $ hg push --config lfs.url=ftp://foobar | |
135 | abort: lfs: unknown url scheme: ftp |
|
135 | abort: lfs: unknown url scheme: ftp | |
136 | [255] |
|
136 | [255] | |
137 |
|
137 | |||
138 | $ cd ../ |
|
138 | $ cd ../ | |
139 |
|
139 | |||
140 | # Initialize new client (not cloning) and setup extension |
|
140 | # Initialize new client (not cloning) and setup extension | |
141 | $ hg init client2 |
|
141 | $ hg init client2 | |
142 | $ cd client2 |
|
142 | $ cd client2 | |
143 | $ cat >> .hg/hgrc <<EOF |
|
143 | $ cat >> .hg/hgrc <<EOF | |
144 | > [paths] |
|
144 | > [paths] | |
145 | > default = $TESTTMP/server |
|
145 | > default = $TESTTMP/server | |
146 | > EOF |
|
146 | > EOF | |
147 |
|
147 | |||
148 | # Pull from server |
|
148 | # Pull from server | |
149 |
|
149 | |||
150 | Pulling a local lfs repo into a local non-lfs repo with the extension |
|
150 | Pulling a local lfs repo into a local non-lfs repo with the extension | |
151 | enabled adds the lfs requirement |
|
151 | enabled adds the lfs requirement | |
152 |
|
152 | |||
153 | $ grep lfs .hg/requires $TESTTMP/server/.hg/requires |
|
153 | $ grep lfs .hg/requires $TESTTMP/server/.hg/requires | |
154 | $TESTTMP/server/.hg/requires:lfs |
|
154 | $TESTTMP/server/.hg/requires:lfs | |
155 | $ hg pull default |
|
155 | $ hg pull default | |
156 | pulling from $TESTTMP/server |
|
156 | pulling from $TESTTMP/server | |
157 | requesting all changes |
|
157 | requesting all changes | |
158 | adding changesets |
|
158 | adding changesets | |
159 | adding manifests |
|
159 | adding manifests | |
160 | adding file changes |
|
160 | adding file changes | |
161 | added 2 changesets with 3 changes to 3 files |
|
161 | added 2 changesets with 3 changes to 3 files | |
162 | new changesets 0ead593177f7:b88141481348 |
|
162 | new changesets 0ead593177f7:b88141481348 | |
163 | (run 'hg update' to get a working copy) |
|
163 | (run 'hg update' to get a working copy) | |
164 | $ grep lfs .hg/requires $TESTTMP/server/.hg/requires |
|
164 | $ grep lfs .hg/requires $TESTTMP/server/.hg/requires | |
165 | .hg/requires:lfs |
|
165 | .hg/requires:lfs | |
166 | $TESTTMP/server/.hg/requires:lfs |
|
166 | $TESTTMP/server/.hg/requires:lfs | |
167 |
|
167 | |||
168 | # Check the blobstore is not yet populated |
|
168 | # Check the blobstore is not yet populated | |
169 | $ [ -d .hg/store/lfs/objects ] |
|
169 | $ [ -d .hg/store/lfs/objects ] | |
170 | [1] |
|
170 | [1] | |
171 |
|
171 | |||
172 | # Update to the last revision containing the large file |
|
172 | # Update to the last revision containing the large file | |
173 | $ hg update |
|
173 | $ hg update | |
174 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
174 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
175 |
|
175 | |||
176 | # Check the blobstore has been populated on update |
|
176 | # Check the blobstore has been populated on update | |
177 | $ find .hg/store/lfs/objects | sort |
|
177 | $ find .hg/store/lfs/objects | sort | |
178 | .hg/store/lfs/objects |
|
178 | .hg/store/lfs/objects | |
179 | .hg/store/lfs/objects/f1 |
|
179 | .hg/store/lfs/objects/f1 | |
180 | .hg/store/lfs/objects/f1/1e77c257047a398492d8d6cb9f6acf3aa7c4384bb23080b43546053e183e4b |
|
180 | .hg/store/lfs/objects/f1/1e77c257047a398492d8d6cb9f6acf3aa7c4384bb23080b43546053e183e4b | |
181 |
|
181 | |||
182 | # Check the contents of the file are fetched from blobstore when requested |
|
182 | # Check the contents of the file are fetched from blobstore when requested | |
183 | $ hg cat -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$ cd .. |
|
190 | $ cd .. | |
191 |
|
191 | |||
192 | # Check rename, and switch between large and small files |
|
192 | # Check rename, and switch between large and small files | |
193 |
|
193 | |||
194 | $ hg init repo3 |
|
194 | $ hg init repo3 | |
195 | $ cd repo3 |
|
195 | $ cd repo3 | |
196 | $ cat >> .hg/hgrc << EOF |
|
196 | $ cat >> .hg/hgrc << EOF | |
197 | > [lfs] |
|
197 | > [lfs] | |
198 | > track=size(">10B") |
|
198 | > track=size(">10B") | |
199 | > EOF |
|
199 | > EOF | |
200 |
|
200 | |||
201 | $ echo LONGER-THAN-TEN-BYTES-WILL-TRIGGER-LFS > large |
|
201 | $ echo LONGER-THAN-TEN-BYTES-WILL-TRIGGER-LFS > large | |
202 | $ echo SHORTER > small |
|
202 | $ echo SHORTER > small | |
203 | $ hg add . -q |
|
203 | $ hg add . -q | |
204 | $ hg commit -m 'commit with lfs content' |
|
204 | $ hg commit -m 'commit with lfs content' | |
205 |
|
205 | |||
206 | $ hg files -r . 'set:added()' |
|
206 | $ hg files -r . 'set:added()' | |
207 | large |
|
207 | large | |
208 | small |
|
208 | small | |
209 | $ hg files -r . 'set:added() & lfs()' |
|
209 | $ hg files -r . 'set:added() & lfs()' | |
210 | large |
|
210 | large | |
211 |
|
211 | |||
212 | $ hg mv large l |
|
212 | $ hg mv large l | |
213 | $ hg mv small s |
|
213 | $ hg mv small s | |
214 | $ hg status 'set:removed()' |
|
214 | $ hg status 'set:removed()' | |
215 | R large |
|
215 | R large | |
216 | R small |
|
216 | R small | |
217 | $ hg status 'set:removed() & lfs()' |
|
217 | $ hg status 'set:removed() & lfs()' | |
218 | R large |
|
218 | R large | |
219 | $ hg commit -m 'renames' |
|
219 | $ hg commit -m 'renames' | |
220 |
|
220 | |||
221 | $ hg cat -r . l -T '{rawdata}\n' |
|
221 | $ hg cat -r . l -T '{rawdata}\n' | |
222 | version https://git-lfs.github.com/spec/v1 |
|
222 | version https://git-lfs.github.com/spec/v1 | |
223 | oid sha256:66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e |
|
223 | oid sha256:66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e | |
224 | size 39 |
|
224 | size 39 | |
225 | x-hg-copy large |
|
225 | x-hg-copy large | |
226 | x-hg-copyrev 2c531e0992ff3107c511b53cb82a91b6436de8b2 |
|
226 | x-hg-copyrev 2c531e0992ff3107c511b53cb82a91b6436de8b2 | |
227 | x-is-binary 0 |
|
227 | x-is-binary 0 | |
228 |
|
228 | |||
229 |
|
229 | |||
230 | $ hg files -r . 'set:copied()' |
|
230 | $ hg files -r . 'set:copied()' | |
231 | l |
|
231 | l | |
232 | s |
|
232 | s | |
233 | $ hg files -r . 'set:copied() & lfs()' |
|
233 | $ hg files -r . 'set:copied() & lfs()' | |
234 | l |
|
234 | l | |
235 | $ hg status --change . 'set:removed()' |
|
235 | $ hg status --change . 'set:removed()' | |
236 | R large |
|
236 | R large | |
237 | R small |
|
237 | R small | |
238 | $ hg status --change . 'set:removed() & lfs()' |
|
238 | $ hg status --change . 'set:removed() & lfs()' | |
239 | R large |
|
239 | R large | |
240 |
|
240 | |||
241 | $ echo SHORT > l |
|
241 | $ echo SHORT > l | |
242 | $ echo BECOME-LARGER-FROM-SHORTER > s |
|
242 | $ echo BECOME-LARGER-FROM-SHORTER > s | |
243 | $ hg commit -m 'large to small, small to large' |
|
243 | $ hg commit -m 'large to small, small to large' | |
244 |
|
244 | |||
245 | $ echo 1 >> l |
|
245 | $ echo 1 >> l | |
246 | $ echo 2 >> s |
|
246 | $ echo 2 >> s | |
247 | $ hg commit -m 'random modifications' |
|
247 | $ hg commit -m 'random modifications' | |
248 |
|
248 | |||
249 | $ echo RESTORE-TO-BE-LARGE > l |
|
249 | $ echo RESTORE-TO-BE-LARGE > l | |
250 | $ echo SHORTER > s |
|
250 | $ echo SHORTER > s | |
251 | $ hg commit -m 'switch large and small again' |
|
251 | $ hg commit -m 'switch large and small again' | |
252 |
|
252 | |||
253 | # Test lfs_files template |
|
253 | # Test lfs_files template | |
254 |
|
254 | |||
255 | $ hg log -r 'all()' -T '{rev} {join(lfs_files, ", ")}\n' |
|
255 | $ hg log -r 'all()' -T '{rev} {join(lfs_files, ", ")}\n' | |
256 | 0 large |
|
256 | 0 large | |
257 | 1 l, large |
|
257 | 1 l, large | |
258 | 2 s |
|
258 | 2 s | |
259 | 3 s |
|
259 | 3 s | |
260 | 4 l |
|
260 | 4 l | |
261 |
|
261 | |||
262 | # Push and pull the above repo |
|
262 | # Push and pull the above repo | |
263 |
|
263 | |||
264 | $ hg --cwd .. init repo4 |
|
264 | $ hg --cwd .. init repo4 | |
265 | $ hg push ../repo4 |
|
265 | $ hg push ../repo4 | |
266 | pushing to ../repo4 |
|
266 | pushing to ../repo4 | |
267 | searching for changes |
|
267 | searching for changes | |
268 | adding changesets |
|
268 | adding changesets | |
269 | adding manifests |
|
269 | adding manifests | |
270 | adding file changes |
|
270 | adding file changes | |
271 | added 5 changesets with 10 changes to 4 files |
|
271 | added 5 changesets with 10 changes to 4 files | |
272 |
|
272 | |||
273 | $ hg --cwd .. init repo5 |
|
273 | $ hg --cwd .. init repo5 | |
274 | $ hg --cwd ../repo5 pull ../repo3 |
|
274 | $ hg --cwd ../repo5 pull ../repo3 | |
275 | pulling from ../repo3 |
|
275 | pulling from ../repo3 | |
276 | requesting all changes |
|
276 | requesting all changes | |
277 | adding changesets |
|
277 | adding changesets | |
278 | adding manifests |
|
278 | adding manifests | |
279 | adding file changes |
|
279 | adding file changes | |
280 | added 5 changesets with 10 changes to 4 files |
|
280 | added 5 changesets with 10 changes to 4 files | |
281 | new changesets fd47a419c4f7:5adf850972b9 |
|
281 | new changesets fd47a419c4f7:5adf850972b9 | |
282 | (run 'hg update' to get a working copy) |
|
282 | (run 'hg update' to get a working copy) | |
283 |
|
283 | |||
284 | $ cd .. |
|
284 | $ cd .. | |
285 |
|
285 | |||
286 | # Test clone |
|
286 | # Test clone | |
287 |
|
287 | |||
288 | $ hg init repo6 |
|
288 | $ hg init repo6 | |
289 | $ cd repo6 |
|
289 | $ cd repo6 | |
290 | $ cat >> .hg/hgrc << EOF |
|
290 | $ cat >> .hg/hgrc << EOF | |
291 | > [lfs] |
|
291 | > [lfs] | |
292 | > track=size(">30B") |
|
292 | > track=size(">30B") | |
293 | > EOF |
|
293 | > EOF | |
294 |
|
294 | |||
295 | $ echo LARGE-BECAUSE-IT-IS-MORE-THAN-30-BYTES > large |
|
295 | $ echo LARGE-BECAUSE-IT-IS-MORE-THAN-30-BYTES > large | |
296 | $ echo SMALL > small |
|
296 | $ echo SMALL > small | |
297 | $ hg commit -Aqm 'create a lfs file' large small |
|
297 | $ hg commit -Aqm 'create a lfs file' large small | |
298 | $ hg debuglfsupload -r 'all()' -v |
|
298 | $ hg debuglfsupload -r 'all()' -v | |
299 | lfs: found 8e92251415339ae9b148c8da89ed5ec665905166a1ab11b09dca8fad83344738 in the local lfs store |
|
299 | lfs: found 8e92251415339ae9b148c8da89ed5ec665905166a1ab11b09dca8fad83344738 in the local lfs store | |
300 |
|
300 | |||
301 | $ cd .. |
|
301 | $ cd .. | |
302 |
|
302 | |||
303 | $ hg clone repo6 repo7 |
|
303 | $ hg clone repo6 repo7 | |
304 | updating to branch default |
|
304 | updating to branch default | |
305 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
305 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
306 | $ cd repo7 |
|
306 | $ cd repo7 | |
307 | $ cat large |
|
307 | $ cat large | |
308 | LARGE-BECAUSE-IT-IS-MORE-THAN-30-BYTES |
|
308 | LARGE-BECAUSE-IT-IS-MORE-THAN-30-BYTES | |
309 | $ cat small |
|
309 | $ cat small | |
310 | SMALL |
|
310 | SMALL | |
311 |
|
311 | |||
312 | $ cd .. |
|
312 | $ cd .. | |
313 |
|
313 | |||
314 | $ hg --config extensions.share= share repo7 sharedrepo |
|
314 | $ hg --config extensions.share= share repo7 sharedrepo | |
315 | updating working directory |
|
315 | updating working directory | |
316 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
316 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
317 | $ grep lfs sharedrepo/.hg/requires |
|
317 | $ grep lfs sharedrepo/.hg/requires | |
318 | lfs |
|
318 | lfs | |
319 |
|
319 | |||
320 | # Test rename and status |
|
320 | # Test rename and status | |
321 |
|
321 | |||
322 | $ hg init repo8 |
|
322 | $ hg init repo8 | |
323 | $ cd repo8 |
|
323 | $ cd repo8 | |
324 | $ cat >> .hg/hgrc << EOF |
|
324 | $ cat >> .hg/hgrc << EOF | |
325 | > [lfs] |
|
325 | > [lfs] | |
326 | > track=size(">10B") |
|
326 | > track=size(">10B") | |
327 | > EOF |
|
327 | > EOF | |
328 |
|
328 | |||
329 | $ echo THIS-IS-LFS-BECAUSE-10-BYTES > a1 |
|
329 | $ echo THIS-IS-LFS-BECAUSE-10-BYTES > a1 | |
330 | $ echo SMALL > a2 |
|
330 | $ echo SMALL > a2 | |
331 | $ hg commit -m a -A a1 a2 |
|
331 | $ hg commit -m a -A a1 a2 | |
332 | $ hg status |
|
332 | $ hg status | |
333 | $ hg mv a1 b1 |
|
333 | $ hg mv a1 b1 | |
334 | $ hg mv a2 a1 |
|
334 | $ hg mv a2 a1 | |
335 | $ hg mv b1 a2 |
|
335 | $ hg mv b1 a2 | |
336 | $ hg commit -m b |
|
336 | $ hg commit -m b | |
337 | $ hg status |
|
337 | $ hg status | |
338 | >>> with open('a2', 'wb') as f: |
|
338 | >>> with open('a2', 'wb') as f: | |
339 | ... f.write(b'\1\nSTART-WITH-HG-FILELOG-METADATA') and None |
|
339 | ... f.write(b'\1\nSTART-WITH-HG-FILELOG-METADATA') and None | |
340 | >>> with open('a1', 'wb') as f: |
|
340 | >>> with open('a1', 'wb') as f: | |
341 | ... f.write(b'\1\nMETA\n') and None |
|
341 | ... f.write(b'\1\nMETA\n') and None | |
342 | $ hg commit -m meta |
|
342 | $ hg commit -m meta | |
343 | $ hg status |
|
343 | $ hg status | |
344 | $ hg log -T '{rev}: {file_copies} | {file_dels} | {file_adds}\n' |
|
344 | $ hg log -T '{rev}: {file_copies} | {file_dels} | {file_adds}\n' | |
345 | 2: | | |
|
345 | 2: | | | |
346 | 1: a1 (a2)a2 (a1) | | |
|
346 | 1: a1 (a2)a2 (a1) | | | |
347 | 0: | | a1 a2 |
|
347 | 0: | | a1 a2 | |
348 |
|
348 | |||
349 | $ for n in a1 a2; do |
|
349 | $ for n in a1 a2; do | |
350 | > for r in 0 1 2; do |
|
350 | > for r in 0 1 2; do | |
351 | > printf '\n%s @ %s\n' $n $r |
|
351 | > printf '\n%s @ %s\n' $n $r | |
352 | > hg debugdata $n $r |
|
352 | > hg debugdata $n $r | |
353 | > done |
|
353 | > done | |
354 | > done |
|
354 | > done | |
355 |
|
355 | |||
356 | a1 @ 0 |
|
356 | a1 @ 0 | |
357 | version https://git-lfs.github.com/spec/v1 |
|
357 | version https://git-lfs.github.com/spec/v1 | |
358 | oid sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 |
|
358 | oid sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 | |
359 | size 29 |
|
359 | size 29 | |
360 | x-is-binary 0 |
|
360 | x-is-binary 0 | |
361 |
|
361 | |||
362 | a1 @ 1 |
|
362 | a1 @ 1 | |
363 | \x01 (esc) |
|
363 | \x01 (esc) | |
364 | copy: a2 |
|
364 | copy: a2 | |
365 | copyrev: 50470ad23cf937b1f4b9f80bfe54df38e65b50d9 |
|
365 | copyrev: 50470ad23cf937b1f4b9f80bfe54df38e65b50d9 | |
366 | \x01 (esc) |
|
366 | \x01 (esc) | |
367 | SMALL |
|
367 | SMALL | |
368 |
|
368 | |||
369 | a1 @ 2 |
|
369 | a1 @ 2 | |
370 | \x01 (esc) |
|
370 | \x01 (esc) | |
371 | \x01 (esc) |
|
371 | \x01 (esc) | |
372 | \x01 (esc) |
|
372 | \x01 (esc) | |
373 | META |
|
373 | META | |
374 |
|
374 | |||
375 | a2 @ 0 |
|
375 | a2 @ 0 | |
376 | SMALL |
|
376 | SMALL | |
377 |
|
377 | |||
378 | a2 @ 1 |
|
378 | a2 @ 1 | |
379 | version https://git-lfs.github.com/spec/v1 |
|
379 | version https://git-lfs.github.com/spec/v1 | |
380 | oid sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 |
|
380 | oid sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 | |
381 | size 29 |
|
381 | size 29 | |
382 | x-hg-copy a1 |
|
382 | x-hg-copy a1 | |
383 | x-hg-copyrev be23af27908a582af43e5cda209a5a9b319de8d4 |
|
383 | x-hg-copyrev be23af27908a582af43e5cda209a5a9b319de8d4 | |
384 | x-is-binary 0 |
|
384 | x-is-binary 0 | |
385 |
|
385 | |||
386 | a2 @ 2 |
|
386 | a2 @ 2 | |
387 | version https://git-lfs.github.com/spec/v1 |
|
387 | version https://git-lfs.github.com/spec/v1 | |
388 | oid sha256:876dadc86a8542f9798048f2c47f51dbf8e4359aed883e8ec80c5db825f0d943 |
|
388 | oid sha256:876dadc86a8542f9798048f2c47f51dbf8e4359aed883e8ec80c5db825f0d943 | |
389 | size 32 |
|
389 | size 32 | |
390 | x-is-binary 0 |
|
390 | x-is-binary 0 | |
391 |
|
391 | |||
392 | # Verify commit hashes include rename metadata |
|
392 | # Verify commit hashes include rename metadata | |
393 |
|
393 | |||
394 | $ hg log -T '{rev}:{node|short} {desc}\n' |
|
394 | $ hg log -T '{rev}:{node|short} {desc}\n' | |
395 | 2:0fae949de7fa meta |
|
395 | 2:0fae949de7fa meta | |
396 | 1:9cd6bdffdac0 b |
|
396 | 1:9cd6bdffdac0 b | |
397 | 0:7f96794915f7 a |
|
397 | 0:7f96794915f7 a | |
398 |
|
398 | |||
399 | $ cd .. |
|
399 | $ cd .. | |
400 |
|
400 | |||
401 | # Test bundle |
|
401 | # Test bundle | |
402 |
|
402 | |||
403 | $ hg init repo9 |
|
403 | $ hg init repo9 | |
404 | $ cd repo9 |
|
404 | $ cd repo9 | |
405 | $ cat >> .hg/hgrc << EOF |
|
405 | $ cat >> .hg/hgrc << EOF | |
406 | > [lfs] |
|
406 | > [lfs] | |
407 | > track=size(">10B") |
|
407 | > track=size(">10B") | |
408 | > [diff] |
|
408 | > [diff] | |
409 | > git=1 |
|
409 | > git=1 | |
410 | > EOF |
|
410 | > EOF | |
411 |
|
411 | |||
412 | $ for i in 0 single two three 4; do |
|
412 | $ for i in 0 single two three 4; do | |
413 | > echo 'THIS-IS-LFS-'$i > a |
|
413 | > echo 'THIS-IS-LFS-'$i > a | |
414 | > hg commit -m a-$i -A a |
|
414 | > hg commit -m a-$i -A a | |
415 | > done |
|
415 | > done | |
416 |
|
416 | |||
417 | $ hg update 2 -q |
|
417 | $ hg update 2 -q | |
418 | $ echo 'THIS-IS-LFS-2-CHILD' > a |
|
418 | $ echo 'THIS-IS-LFS-2-CHILD' > a | |
419 | $ hg commit -m branching -q |
|
419 | $ hg commit -m branching -q | |
420 |
|
420 | |||
421 | $ hg bundle --base 1 bundle.hg -v |
|
421 | $ hg bundle --base 1 bundle.hg -v | |
422 | lfs: found 5ab7a3739a5feec94a562d070a14f36dba7cad17e5484a4a89eea8e5f3166888 in the local lfs store |
|
422 | lfs: found 5ab7a3739a5feec94a562d070a14f36dba7cad17e5484a4a89eea8e5f3166888 in the local lfs store | |
423 | lfs: found a9c7d1cd6ce2b9bbdf46ed9a862845228717b921c089d0d42e3bcaed29eb612e in the local lfs store |
|
423 | lfs: found a9c7d1cd6ce2b9bbdf46ed9a862845228717b921c089d0d42e3bcaed29eb612e in the local lfs store | |
424 | lfs: found f693890c49c409ec33673b71e53f297681f76c1166daf33b2ad7ebf8b1d3237e in the local lfs store |
|
424 | lfs: found f693890c49c409ec33673b71e53f297681f76c1166daf33b2ad7ebf8b1d3237e in the local lfs store | |
425 | lfs: found fda198fea753eb66a252e9856915e1f5cddbe41723bd4b695ece2604ad3c9f75 in the local lfs store |
|
425 | lfs: found fda198fea753eb66a252e9856915e1f5cddbe41723bd4b695ece2604ad3c9f75 in the local lfs store | |
426 | 4 changesets found |
|
426 | 4 changesets found | |
427 | uncompressed size of bundle content: |
|
427 | uncompressed size of bundle content: | |
428 | * (changelog) (glob) |
|
428 | * (changelog) (glob) | |
429 | * (manifests) (glob) |
|
429 | * (manifests) (glob) | |
430 | * a (glob) |
|
430 | * a (glob) | |
431 | $ hg --config extensions.strip= strip -r 2 --no-backup --force -q |
|
431 | $ hg --config extensions.strip= strip -r 2 --no-backup --force -q | |
432 | $ hg -R bundle.hg log -p -T '{rev} {desc}\n' a |
|
432 | $ hg -R bundle.hg log -p -T '{rev} {desc}\n' a | |
433 | 5 branching |
|
433 | 5 branching | |
434 | diff --git a/a b/a |
|
434 | diff --git a/a b/a | |
435 | --- a/a |
|
435 | --- a/a | |
436 | +++ b/a |
|
436 | +++ b/a | |
437 | @@ -1,1 +1,1 @@ |
|
437 | @@ -1,1 +1,1 @@ | |
438 | -THIS-IS-LFS-two |
|
438 | -THIS-IS-LFS-two | |
439 | +THIS-IS-LFS-2-CHILD |
|
439 | +THIS-IS-LFS-2-CHILD | |
440 |
|
440 | |||
441 | 4 a-4 |
|
441 | 4 a-4 | |
442 | diff --git a/a b/a |
|
442 | diff --git a/a b/a | |
443 | --- a/a |
|
443 | --- a/a | |
444 | +++ b/a |
|
444 | +++ b/a | |
445 | @@ -1,1 +1,1 @@ |
|
445 | @@ -1,1 +1,1 @@ | |
446 | -THIS-IS-LFS-three |
|
446 | -THIS-IS-LFS-three | |
447 | +THIS-IS-LFS-4 |
|
447 | +THIS-IS-LFS-4 | |
448 |
|
448 | |||
449 | 3 a-three |
|
449 | 3 a-three | |
450 | diff --git a/a b/a |
|
450 | diff --git a/a b/a | |
451 | --- a/a |
|
451 | --- a/a | |
452 | +++ b/a |
|
452 | +++ b/a | |
453 | @@ -1,1 +1,1 @@ |
|
453 | @@ -1,1 +1,1 @@ | |
454 | -THIS-IS-LFS-two |
|
454 | -THIS-IS-LFS-two | |
455 | +THIS-IS-LFS-three |
|
455 | +THIS-IS-LFS-three | |
456 |
|
456 | |||
457 | 2 a-two |
|
457 | 2 a-two | |
458 | diff --git a/a b/a |
|
458 | diff --git a/a b/a | |
459 | --- a/a |
|
459 | --- a/a | |
460 | +++ b/a |
|
460 | +++ b/a | |
461 | @@ -1,1 +1,1 @@ |
|
461 | @@ -1,1 +1,1 @@ | |
462 | -THIS-IS-LFS-single |
|
462 | -THIS-IS-LFS-single | |
463 | +THIS-IS-LFS-two |
|
463 | +THIS-IS-LFS-two | |
464 |
|
464 | |||
465 | 1 a-single |
|
465 | 1 a-single | |
466 | diff --git a/a b/a |
|
466 | diff --git a/a b/a | |
467 | --- a/a |
|
467 | --- a/a | |
468 | +++ b/a |
|
468 | +++ b/a | |
469 | @@ -1,1 +1,1 @@ |
|
469 | @@ -1,1 +1,1 @@ | |
470 | -THIS-IS-LFS-0 |
|
470 | -THIS-IS-LFS-0 | |
471 | +THIS-IS-LFS-single |
|
471 | +THIS-IS-LFS-single | |
472 |
|
472 | |||
473 | 0 a-0 |
|
473 | 0 a-0 | |
474 | diff --git a/a b/a |
|
474 | diff --git a/a b/a | |
475 | new file mode 100644 |
|
475 | new file mode 100644 | |
476 | --- /dev/null |
|
476 | --- /dev/null | |
477 | +++ b/a |
|
477 | +++ b/a | |
478 | @@ -0,0 +1,1 @@ |
|
478 | @@ -0,0 +1,1 @@ | |
479 | +THIS-IS-LFS-0 |
|
479 | +THIS-IS-LFS-0 | |
480 |
|
480 | |||
481 | $ hg bundle -R bundle.hg --base 1 bundle-again.hg -q |
|
481 | $ hg bundle -R bundle.hg --base 1 bundle-again.hg -q | |
482 | $ hg -R bundle-again.hg log -p -T '{rev} {desc}\n' a |
|
482 | $ hg -R bundle-again.hg log -p -T '{rev} {desc}\n' a | |
483 | 5 branching |
|
483 | 5 branching | |
484 | diff --git a/a b/a |
|
484 | diff --git a/a b/a | |
485 | --- a/a |
|
485 | --- a/a | |
486 | +++ b/a |
|
486 | +++ b/a | |
487 | @@ -1,1 +1,1 @@ |
|
487 | @@ -1,1 +1,1 @@ | |
488 | -THIS-IS-LFS-two |
|
488 | -THIS-IS-LFS-two | |
489 | +THIS-IS-LFS-2-CHILD |
|
489 | +THIS-IS-LFS-2-CHILD | |
490 |
|
490 | |||
491 | 4 a-4 |
|
491 | 4 a-4 | |
492 | diff --git a/a b/a |
|
492 | diff --git a/a b/a | |
493 | --- a/a |
|
493 | --- a/a | |
494 | +++ b/a |
|
494 | +++ b/a | |
495 | @@ -1,1 +1,1 @@ |
|
495 | @@ -1,1 +1,1 @@ | |
496 | -THIS-IS-LFS-three |
|
496 | -THIS-IS-LFS-three | |
497 | +THIS-IS-LFS-4 |
|
497 | +THIS-IS-LFS-4 | |
498 |
|
498 | |||
499 | 3 a-three |
|
499 | 3 a-three | |
500 | diff --git a/a b/a |
|
500 | diff --git a/a b/a | |
501 | --- a/a |
|
501 | --- a/a | |
502 | +++ b/a |
|
502 | +++ b/a | |
503 | @@ -1,1 +1,1 @@ |
|
503 | @@ -1,1 +1,1 @@ | |
504 | -THIS-IS-LFS-two |
|
504 | -THIS-IS-LFS-two | |
505 | +THIS-IS-LFS-three |
|
505 | +THIS-IS-LFS-three | |
506 |
|
506 | |||
507 | 2 a-two |
|
507 | 2 a-two | |
508 | diff --git a/a b/a |
|
508 | diff --git a/a b/a | |
509 | --- a/a |
|
509 | --- a/a | |
510 | +++ b/a |
|
510 | +++ b/a | |
511 | @@ -1,1 +1,1 @@ |
|
511 | @@ -1,1 +1,1 @@ | |
512 | -THIS-IS-LFS-single |
|
512 | -THIS-IS-LFS-single | |
513 | +THIS-IS-LFS-two |
|
513 | +THIS-IS-LFS-two | |
514 |
|
514 | |||
515 | 1 a-single |
|
515 | 1 a-single | |
516 | diff --git a/a b/a |
|
516 | diff --git a/a b/a | |
517 | --- a/a |
|
517 | --- a/a | |
518 | +++ b/a |
|
518 | +++ b/a | |
519 | @@ -1,1 +1,1 @@ |
|
519 | @@ -1,1 +1,1 @@ | |
520 | -THIS-IS-LFS-0 |
|
520 | -THIS-IS-LFS-0 | |
521 | +THIS-IS-LFS-single |
|
521 | +THIS-IS-LFS-single | |
522 |
|
522 | |||
523 | 0 a-0 |
|
523 | 0 a-0 | |
524 | diff --git a/a b/a |
|
524 | diff --git a/a b/a | |
525 | new file mode 100644 |
|
525 | new file mode 100644 | |
526 | --- /dev/null |
|
526 | --- /dev/null | |
527 | +++ b/a |
|
527 | +++ b/a | |
528 | @@ -0,0 +1,1 @@ |
|
528 | @@ -0,0 +1,1 @@ | |
529 | +THIS-IS-LFS-0 |
|
529 | +THIS-IS-LFS-0 | |
530 |
|
530 | |||
531 | $ cd .. |
|
531 | $ cd .. | |
532 |
|
532 | |||
533 | # Test isbinary |
|
533 | # Test isbinary | |
534 |
|
534 | |||
535 | $ hg init repo10 |
|
535 | $ hg init repo10 | |
536 | $ cd repo10 |
|
536 | $ cd repo10 | |
537 | $ cat >> .hg/hgrc << EOF |
|
537 | $ cat >> .hg/hgrc << EOF | |
538 | > [extensions] |
|
538 | > [extensions] | |
539 | > lfs= |
|
539 | > lfs= | |
540 | > [lfs] |
|
540 | > [lfs] | |
541 | > track=all() |
|
541 | > track=all() | |
542 | > EOF |
|
542 | > EOF | |
543 | $ "$PYTHON" <<'EOF' |
|
543 | $ "$PYTHON" <<'EOF' | |
544 | > def write(path, content): |
|
544 | > def write(path, content): | |
545 | > with open(path, 'wb') as f: |
|
545 | > with open(path, 'wb') as f: | |
546 | > f.write(content) |
|
546 | > f.write(content) | |
547 | > write('a', b'\0\0') |
|
547 | > write('a', b'\0\0') | |
548 | > write('b', b'\1\n') |
|
548 | > write('b', b'\1\n') | |
549 | > write('c', b'\1\n\0') |
|
549 | > write('c', b'\1\n\0') | |
550 | > write('d', b'xx') |
|
550 | > write('d', b'xx') | |
551 | > EOF |
|
551 | > EOF | |
552 | $ hg add a b c d |
|
552 | $ hg add a b c d | |
553 | $ hg diff --stat |
|
553 | $ hg diff --stat | |
554 | a | Bin |
|
554 | a | Bin | |
555 | b | 1 + |
|
555 | b | 1 + | |
556 | c | Bin |
|
556 | c | Bin | |
557 | d | 1 + |
|
557 | d | 1 + | |
558 | 4 files changed, 2 insertions(+), 0 deletions(-) |
|
558 | 4 files changed, 2 insertions(+), 0 deletions(-) | |
559 | $ hg commit -m binarytest |
|
559 | $ hg commit -m binarytest | |
560 | $ cat > $TESTTMP/dumpbinary.py << EOF |
|
560 | $ cat > $TESTTMP/dumpbinary.py << EOF | |
561 | > from mercurial.utils import ( |
|
561 | > from mercurial.utils import ( | |
562 | > stringutil, |
|
562 | > stringutil, | |
563 | > ) |
|
563 | > ) | |
564 | > def reposetup(ui, repo): |
|
564 | > def reposetup(ui, repo): | |
565 | > for n in (b'a', b'b', b'c', b'd'): |
|
565 | > for n in (b'a', b'b', b'c', b'd'): | |
566 | > ui.write((b'%s: binary=%s\n') |
|
566 | > ui.write((b'%s: binary=%s\n') | |
567 | > % (n, stringutil.pprint(repo[b'.'][n].isbinary()))) |
|
567 | > % (n, stringutil.pprint(repo[b'.'][n].isbinary()))) | |
568 | > EOF |
|
568 | > EOF | |
569 | $ hg --config extensions.dumpbinary=$TESTTMP/dumpbinary.py id --trace |
|
569 | $ hg --config extensions.dumpbinary=$TESTTMP/dumpbinary.py id --trace | |
570 | a: binary=True |
|
570 | a: binary=True | |
571 | b: binary=False |
|
571 | b: binary=False | |
572 | c: binary=True |
|
572 | c: binary=True | |
573 | d: binary=False |
|
573 | d: binary=False | |
574 | b55353847f02 tip |
|
574 | b55353847f02 tip | |
575 |
|
575 | |||
576 | Binary blobs don't need to be present to be skipped in filesets. (And their |
|
576 | Binary blobs don't need to be present to be skipped in filesets. (And their | |
577 | absence doesn't cause an abort.) |
|
577 | absence doesn't cause an abort.) | |
578 |
|
578 | |||
579 | $ rm .hg/store/lfs/objects/96/a296d224f285c67bee93c30f8a309157f0daa35dc5b87e410b78630a09cfc7 |
|
579 | $ rm .hg/store/lfs/objects/96/a296d224f285c67bee93c30f8a309157f0daa35dc5b87e410b78630a09cfc7 | |
580 | $ rm .hg/store/lfs/objects/92/f76135a4baf4faccb8586a60faf830c2bdfce147cefa188aaf4b790bd01b7e |
|
580 | $ rm .hg/store/lfs/objects/92/f76135a4baf4faccb8586a60faf830c2bdfce147cefa188aaf4b790bd01b7e | |
581 |
|
581 | |||
582 | $ hg files --debug -r . 'set:eol("unix")' --config 'experimental.lfs.disableusercache=True' |
|
582 | $ hg files --debug -r . 'set:eol("unix")' --config 'experimental.lfs.disableusercache=True' | |
583 | lfs: found c04b5bb1a5b2eb3e9cd4805420dba5a9d133da5b7adeeafb5474c4adae9faa80 in the local lfs store |
|
583 | lfs: found c04b5bb1a5b2eb3e9cd4805420dba5a9d133da5b7adeeafb5474c4adae9faa80 in the local lfs store | |
584 | 2 b |
|
584 | 2 b | |
585 | lfs: found 5dde896887f6754c9b15bfe3a441ae4806df2fde94001311e08bf110622e0bbe in the local lfs store |
|
585 | lfs: found 5dde896887f6754c9b15bfe3a441ae4806df2fde94001311e08bf110622e0bbe in the local lfs store | |
586 |
|
586 | |||
587 | $ hg files --debug -r . 'set:binary()' --config 'experimental.lfs.disableusercache=True' |
|
587 | $ hg files --debug -r . 'set:binary()' --config 'experimental.lfs.disableusercache=True' | |
588 | 2 a |
|
588 | 2 a | |
589 | 3 c |
|
589 | 3 c | |
590 |
|
590 | |||
591 | $ cd .. |
|
591 | $ cd .. | |
592 |
|
592 | |||
593 | # Test fctx.cmp fastpath - diff without LFS blobs |
|
593 | # Test fctx.cmp fastpath - diff without LFS blobs | |
594 |
|
594 | |||
595 | $ hg init repo12 |
|
595 | $ hg init repo12 | |
596 | $ cd repo12 |
|
596 | $ cd repo12 | |
597 | $ cat >> .hg/hgrc <<EOF |
|
597 | $ cat >> .hg/hgrc <<EOF | |
598 | > [lfs] |
|
598 | > [lfs] | |
599 | > threshold=1 |
|
599 | > threshold=1 | |
600 | > EOF |
|
600 | > EOF | |
601 | $ cat > ../patch.diff <<EOF |
|
601 | $ cat > ../patch.diff <<EOF | |
602 | > # HG changeset patch |
|
602 | > # HG changeset patch | |
603 | > 2 |
|
603 | > 2 | |
604 | > |
|
604 | > | |
605 | > diff --git a/a b/a |
|
605 | > diff --git a/a b/a | |
606 | > old mode 100644 |
|
606 | > old mode 100644 | |
607 | > new mode 100755 |
|
607 | > new mode 100755 | |
608 | > EOF |
|
608 | > EOF | |
609 |
|
609 | |||
610 | $ for i in 1 2 3; do |
|
610 | $ for i in 1 2 3; do | |
611 | > cp ../repo10/a a |
|
611 | > cp ../repo10/a a | |
612 | > if [ $i = 3 ]; then |
|
612 | > if [ $i = 3 ]; then | |
613 | > # make a content-only change |
|
613 | > # make a content-only change | |
614 | > hg import -q --bypass ../patch.diff |
|
614 | > hg import -q --bypass ../patch.diff | |
615 | > hg update -q |
|
615 | > hg update -q | |
616 | > rm ../patch.diff |
|
616 | > rm ../patch.diff | |
617 | > else |
|
617 | > else | |
618 | > echo $i >> a |
|
618 | > echo $i >> a | |
619 | > hg commit -m $i -A a |
|
619 | > hg commit -m $i -A a | |
620 | > fi |
|
620 | > fi | |
621 | > done |
|
621 | > done | |
622 | $ [ -d .hg/store/lfs/objects ] |
|
622 | $ [ -d .hg/store/lfs/objects ] | |
623 |
|
623 | |||
624 | $ cd .. |
|
624 | $ cd .. | |
625 |
|
625 | |||
626 | $ hg clone repo12 repo13 --noupdate |
|
626 | $ hg clone repo12 repo13 --noupdate | |
627 | $ cd repo13 |
|
627 | $ cd repo13 | |
628 | $ hg log --removed -p a -T '{desc}\n' --config diff.nobinary=1 --git |
|
628 | $ hg log --removed -p a -T '{desc}\n' --config diff.nobinary=1 --git | |
629 | 2 |
|
629 | 2 | |
630 | diff --git a/a b/a |
|
630 | diff --git a/a b/a | |
631 | old mode 100644 |
|
631 | old mode 100644 | |
632 | new mode 100755 |
|
632 | new mode 100755 | |
633 |
|
633 | |||
634 | 2 |
|
634 | 2 | |
635 | diff --git a/a b/a |
|
635 | diff --git a/a b/a | |
636 | Binary file a has changed |
|
636 | Binary file a has changed | |
637 |
|
637 | |||
638 | 1 |
|
638 | 1 | |
639 | diff --git a/a b/a |
|
639 | diff --git a/a b/a | |
640 | new file mode 100644 |
|
640 | new file mode 100644 | |
641 | Binary file a has changed |
|
641 | Binary file a has changed | |
642 |
|
642 | |||
643 | $ [ -d .hg/store/lfs/objects ] |
|
643 | $ [ -d .hg/store/lfs/objects ] | |
644 | [1] |
|
644 | [1] | |
645 |
|
645 | |||
646 | $ cd .. |
|
646 | $ cd .. | |
647 |
|
647 | |||
648 | # Test filter |
|
648 | # Test filter | |
649 |
|
649 | |||
650 | $ hg init repo11 |
|
650 | $ hg init repo11 | |
651 | $ cd repo11 |
|
651 | $ cd repo11 | |
652 | $ cat >> .hg/hgrc << EOF |
|
652 | $ cat >> .hg/hgrc << EOF | |
653 | > [lfs] |
|
653 | > [lfs] | |
654 | > track=(**.a & size(">5B")) | (**.b & !size(">5B")) |
|
654 | > track=(**.a & size(">5B")) | (**.b & !size(">5B")) | |
655 | > | (**.c & "path:d" & !"path:d/c.c") | size(">10B") |
|
655 | > | (**.c & "path:d" & !"path:d/c.c") | size(">10B") | |
656 | > EOF |
|
656 | > EOF | |
657 |
|
657 | |||
658 | $ mkdir a |
|
658 | $ mkdir a | |
659 | $ echo aaaaaa > a/1.a |
|
659 | $ echo aaaaaa > a/1.a | |
660 | $ echo a > a/2.a |
|
660 | $ echo a > a/2.a | |
661 | $ echo aaaaaa > 1.b |
|
661 | $ echo aaaaaa > 1.b | |
662 | $ echo a > 2.b |
|
662 | $ echo a > 2.b | |
663 | $ echo a > 1.c |
|
663 | $ echo a > 1.c | |
664 | $ mkdir d |
|
664 | $ mkdir d | |
665 | $ echo a > d/c.c |
|
665 | $ echo a > d/c.c | |
666 | $ echo a > d/d.c |
|
666 | $ echo a > d/d.c | |
667 | $ echo aaaaaaaaaaaa > x |
|
667 | $ echo aaaaaaaaaaaa > x | |
668 | $ hg add . -q |
|
668 | $ hg add . -q | |
669 | $ hg commit -m files |
|
669 | $ hg commit -m files | |
670 |
|
670 | |||
671 | $ for p in a/1.a a/2.a 1.b 2.b 1.c d/c.c d/d.c x; do |
|
671 | $ for p in a/1.a a/2.a 1.b 2.b 1.c d/c.c d/d.c x; do | |
672 | > if hg debugdata $p 0 2>&1 | grep git-lfs >/dev/null; then |
|
672 | > if hg debugdata $p 0 2>&1 | grep git-lfs >/dev/null; then | |
673 | > echo "${p}: is lfs" |
|
673 | > echo "${p}: is lfs" | |
674 | > else |
|
674 | > else | |
675 | > echo "${p}: not lfs" |
|
675 | > echo "${p}: not lfs" | |
676 | > fi |
|
676 | > fi | |
677 | > done |
|
677 | > done | |
678 | a/1.a: is lfs |
|
678 | a/1.a: is lfs | |
679 | a/2.a: not lfs |
|
679 | a/2.a: not lfs | |
680 | 1.b: not lfs |
|
680 | 1.b: not lfs | |
681 | 2.b: is lfs |
|
681 | 2.b: is lfs | |
682 | 1.c: not lfs |
|
682 | 1.c: not lfs | |
683 | d/c.c: not lfs |
|
683 | d/c.c: not lfs | |
684 | d/d.c: is lfs |
|
684 | d/d.c: is lfs | |
685 | x: is lfs |
|
685 | x: is lfs | |
686 |
|
686 | |||
687 | $ cd .. |
|
687 | $ cd .. | |
688 |
|
688 | |||
689 | # Verify the repos |
|
689 | # Verify the repos | |
690 |
|
690 | |||
691 | $ cat > $TESTTMP/dumpflog.py << EOF |
|
691 | $ cat > $TESTTMP/dumpflog.py << EOF | |
692 | > # print raw revision sizes, flags, and hashes for certain files |
|
692 | > # print raw revision sizes, flags, and hashes for certain files | |
693 | > import hashlib |
|
693 | > import hashlib | |
694 | > from mercurial.node import short |
|
694 | > from mercurial.node import short | |
695 | > from mercurial import ( |
|
695 | > from mercurial import ( | |
696 | > pycompat, |
|
696 | > pycompat, | |
697 | > revlog, |
|
697 | > revlog, | |
698 | > ) |
|
698 | > ) | |
699 | > from mercurial.utils import ( |
|
699 | > from mercurial.utils import ( | |
700 | > stringutil, |
|
700 | > stringutil, | |
701 | > ) |
|
701 | > ) | |
702 | > def hash(rawtext): |
|
702 | > def hash(rawtext): | |
703 | > h = hashlib.sha512() |
|
703 | > h = hashlib.sha512() | |
704 | > h.update(rawtext) |
|
704 | > h.update(rawtext) | |
705 | > return pycompat.sysbytes(h.hexdigest()[:4]) |
|
705 | > return pycompat.sysbytes(h.hexdigest()[:4]) | |
706 | > def reposetup(ui, repo): |
|
706 | > def reposetup(ui, repo): | |
707 | > # these 2 files are interesting |
|
707 | > # these 2 files are interesting | |
708 | > for name in [b'l', b's']: |
|
708 | > for name in [b'l', b's']: | |
709 | > fl = repo.file(name) |
|
709 | > fl = repo.file(name) | |
710 | > if len(fl) == 0: |
|
710 | > if len(fl) == 0: | |
711 | > continue |
|
711 | > continue | |
712 | > sizes = [fl._revlog.rawsize(i) for i in fl] |
|
712 | > sizes = [fl._revlog.rawsize(i) for i in fl] | |
713 | > texts = [fl.rawdata(i) for i in fl] |
|
713 | > texts = [fl.rawdata(i) for i in fl] | |
714 | > flags = [int(fl._revlog.flags(i)) for i in fl] |
|
714 | > flags = [int(fl._revlog.flags(i)) for i in fl] | |
715 | > hashes = [hash(t) for t in texts] |
|
715 | > hashes = [hash(t) for t in texts] | |
716 | > pycompat.stdout.write(b' %s: rawsizes=%r flags=%r hashes=%s\n' |
|
716 | > pycompat.stdout.write(b' %s: rawsizes=%r flags=%r hashes=%s\n' | |
717 | > % (name, sizes, flags, stringutil.pprint(hashes))) |
|
717 | > % (name, sizes, flags, stringutil.pprint(hashes))) | |
718 | > EOF |
|
718 | > EOF | |
719 |
|
719 | |||
720 | $ for i in client client2 server repo3 repo4 repo5 repo6 repo7 repo8 repo9 \ |
|
720 | $ for i in client client2 server repo3 repo4 repo5 repo6 repo7 repo8 repo9 \ | |
721 | > repo10; do |
|
721 | > repo10; do | |
722 | > echo 'repo:' $i |
|
722 | > echo 'repo:' $i | |
723 | > hg --cwd $i verify --config extensions.dumpflog=$TESTTMP/dumpflog.py -q |
|
723 | > hg --cwd $i verify --config extensions.dumpflog=$TESTTMP/dumpflog.py -q | |
724 | > done |
|
724 | > done | |
725 | repo: client |
|
725 | repo: client | |
726 | repo: client2 |
|
726 | repo: client2 | |
727 | repo: server |
|
727 | repo: server | |
728 | repo: repo3 |
|
728 | repo: repo3 | |
729 | l: rawsizes=[211, 6, 8, 141] flags=[8192, 0, 0, 8192] hashes=['d2b8', '948c', 'cc88', '724d'] |
|
729 | l: rawsizes=[211, 6, 8, 141] flags=[8192, 0, 0, 8192] hashes=['d2b8', '948c', 'cc88', '724d'] | |
730 | s: rawsizes=[74, 141, 141, 8] flags=[0, 8192, 8192, 0] hashes=['3c80', 'fce0', '874a', '826b'] |
|
730 | s: rawsizes=[74, 141, 141, 8] flags=[0, 8192, 8192, 0] hashes=['3c80', 'fce0', '874a', '826b'] | |
731 | repo: repo4 |
|
731 | repo: repo4 | |
732 | l: rawsizes=[211, 6, 8, 141] flags=[8192, 0, 0, 8192] hashes=['d2b8', '948c', 'cc88', '724d'] |
|
732 | l: rawsizes=[211, 6, 8, 141] flags=[8192, 0, 0, 8192] hashes=['d2b8', '948c', 'cc88', '724d'] | |
733 | s: rawsizes=[74, 141, 141, 8] flags=[0, 8192, 8192, 0] hashes=['3c80', 'fce0', '874a', '826b'] |
|
733 | s: rawsizes=[74, 141, 141, 8] flags=[0, 8192, 8192, 0] hashes=['3c80', 'fce0', '874a', '826b'] | |
734 | repo: repo5 |
|
734 | repo: repo5 | |
735 | l: rawsizes=[211, 6, 8, 141] flags=[8192, 0, 0, 8192] hashes=['d2b8', '948c', 'cc88', '724d'] |
|
735 | l: rawsizes=[211, 6, 8, 141] flags=[8192, 0, 0, 8192] hashes=['d2b8', '948c', 'cc88', '724d'] | |
736 | s: rawsizes=[74, 141, 141, 8] flags=[0, 8192, 8192, 0] hashes=['3c80', 'fce0', '874a', '826b'] |
|
736 | s: rawsizes=[74, 141, 141, 8] flags=[0, 8192, 8192, 0] hashes=['3c80', 'fce0', '874a', '826b'] | |
737 | repo: repo6 |
|
737 | repo: repo6 | |
738 | repo: repo7 |
|
738 | repo: repo7 | |
739 | repo: repo8 |
|
739 | repo: repo8 | |
740 | repo: repo9 |
|
740 | repo: repo9 | |
741 | repo: repo10 |
|
741 | repo: repo10 | |
742 |
|
742 | |||
743 | repo13 doesn't have any cached lfs files and its source never pushed its |
|
743 | repo13 doesn't have any cached lfs files and its source never pushed its | |
744 | files. Therefore, the files don't exist in the remote store. Use the files in |
|
744 | files. Therefore, the files don't exist in the remote store. Use the files in | |
745 | the user cache. |
|
745 | the user cache. | |
746 |
|
746 | |||
747 | $ test -d $TESTTMP/repo13/.hg/store/lfs/objects |
|
747 | $ test -d $TESTTMP/repo13/.hg/store/lfs/objects | |
748 | [1] |
|
748 | [1] | |
749 |
|
749 | |||
750 | $ hg --config extensions.share= share repo13 repo14 |
|
750 | $ hg --config extensions.share= share repo13 repo14 | |
751 | updating working directory |
|
751 | updating working directory | |
752 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
752 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
753 | $ hg -R repo14 -q verify |
|
753 | $ hg -R repo14 -q verify | |
754 |
|
754 | |||
755 | $ hg clone repo13 repo15 |
|
755 | $ hg clone repo13 repo15 | |
756 | updating to branch default |
|
756 | updating to branch default | |
757 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
757 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
758 | $ hg -R repo15 -q verify |
|
758 | $ hg -R repo15 -q verify | |
759 |
|
759 | |||
760 | If the source repo doesn't have the blob (maybe it was pulled or cloned with |
|
760 | If the source repo doesn't have the blob (maybe it was pulled or cloned with | |
761 | --noupdate), the blob is still accessible via the global cache to send to the |
|
761 | --noupdate), the blob is still accessible via the global cache to send to the | |
762 | remote store. |
|
762 | remote store. | |
763 |
|
763 | |||
764 | $ rm -rf $TESTTMP/repo15/.hg/store/lfs |
|
764 | $ rm -rf $TESTTMP/repo15/.hg/store/lfs | |
765 | $ hg init repo16 |
|
765 | $ hg init repo16 | |
766 | $ hg -R repo15 push repo16 |
|
766 | $ hg -R repo15 push repo16 | |
767 | pushing to repo16 |
|
767 | pushing to repo16 | |
768 | searching for changes |
|
768 | searching for changes | |
769 | adding changesets |
|
769 | adding changesets | |
770 | adding manifests |
|
770 | adding manifests | |
771 | adding file changes |
|
771 | adding file changes | |
772 | added 3 changesets with 2 changes to 1 files |
|
772 | added 3 changesets with 2 changes to 1 files | |
773 | $ hg -R repo15 -q verify |
|
773 | $ hg -R repo15 -q verify | |
774 |
|
774 | |||
775 | Test damaged file scenarios. (This also damages the usercache because of the |
|
775 | Test damaged file scenarios. (This also damages the usercache because of the | |
776 | hardlinks.) |
|
776 | hardlinks.) | |
777 |
|
777 | |||
778 | $ echo 'damage' >> repo5/.hg/store/lfs/objects/66/100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e |
|
778 | $ echo 'damage' >> repo5/.hg/store/lfs/objects/66/100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e | |
779 |
|
779 | |||
780 | Repo with damaged lfs objects in any revision will fail verification. |
|
780 | Repo with damaged lfs objects in any revision will fail verification. | |
781 |
|
781 | |||
782 | $ hg -R repo5 verify |
|
782 | $ hg -R repo5 verify | |
783 | checking changesets |
|
783 | checking changesets | |
784 | checking manifests |
|
784 | checking manifests | |
785 | crosschecking files in changesets and manifests |
|
785 | crosschecking files in changesets and manifests | |
786 | checking files |
|
786 | checking files | |
787 | l@1: unpacking 46a2f24864bc: integrity check failed on data/l.i:0 |
|
787 | l@1: unpacking 46a2f24864bc: integrity check failed on data/l.i:0 | |
788 | large@0: unpacking 2c531e0992ff: integrity check failed on data/large.i:0 |
|
788 | large@0: unpacking 2c531e0992ff: integrity check failed on data/large.i:0 | |
789 | checked 5 changesets with 10 changes to 4 files |
|
789 | checked 5 changesets with 10 changes to 4 files | |
790 | 2 integrity errors encountered! |
|
790 | 2 integrity errors encountered! | |
791 | (first damaged changeset appears to be 0) |
|
791 | (first damaged changeset appears to be 0) | |
792 | [1] |
|
792 | [1] | |
793 |
|
793 | |||
794 | Updates work after cloning a damaged repo, if the damaged lfs objects aren't in |
|
794 | Updates work after cloning a damaged repo, if the damaged lfs objects aren't in | |
795 | the update destination. Those objects won't be added to the new repo's store |
|
795 | the update destination. Those objects won't be added to the new repo's store | |
796 | because they aren't accessed. |
|
796 | because they aren't accessed. | |
797 |
|
797 | |||
798 | $ hg clone -v repo5 fromcorrupt |
|
798 | $ hg clone -v repo5 fromcorrupt | |
799 | updating to branch default |
|
799 | updating to branch default | |
800 | resolving manifests |
|
800 | resolving manifests | |
801 | getting l |
|
801 | getting l | |
802 | lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the usercache |
|
802 | lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the usercache | |
803 | getting s |
|
803 | getting s | |
804 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
804 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
805 | $ test -f fromcorrupt/.hg/store/lfs/objects/66/100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e |
|
805 | $ test -f fromcorrupt/.hg/store/lfs/objects/66/100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e | |
806 | [1] |
|
806 | [1] | |
807 |
|
807 | |||
808 | Verify will not try to download lfs blobs, if told not to process lfs content. |
|
808 | Verify will not try to download lfs blobs, if told not to process lfs content. | |
809 | The extension makes sure that the filelog.renamed() path is taken on a missing |
|
809 | The extension makes sure that the filelog.renamed() path is taken on a missing | |
810 | blob, and the output shows that it isn't fetched. |
|
810 | blob, and the output shows that it isn't fetched. | |
811 |
|
811 | |||
812 | $ cat > $TESTTMP/lfsrename.py <<EOF |
|
812 | $ cat > $TESTTMP/lfsrename.py <<EOF | |
|
813 | > import sys | |||
|
814 | > | |||
813 | > from mercurial import ( |
|
815 | > from mercurial import ( | |
814 | > exthelper, |
|
816 | > exthelper, | |
|
817 | > pycompat, | |||
815 | > ) |
|
818 | > ) | |
816 | > |
|
819 | > | |
817 | > from hgext.lfs import ( |
|
820 | > from hgext.lfs import ( | |
818 | > pointer, |
|
821 | > pointer, | |
819 | > wrapper, |
|
822 | > wrapper, | |
820 | > ) |
|
823 | > ) | |
821 | > |
|
824 | > | |
822 | > eh = exthelper.exthelper() |
|
825 | > eh = exthelper.exthelper() | |
823 | > uisetup = eh.finaluisetup |
|
826 | > uisetup = eh.finaluisetup | |
824 | > |
|
827 | > | |
825 | > @eh.wrapfunction(wrapper, b'filelogrenamed') |
|
828 | > @eh.wrapfunction(wrapper, b'filelogrenamed') | |
826 | > def filelogrenamed(orig, orig1, self, node): |
|
829 | > def filelogrenamed(orig, orig1, self, node): | |
827 | > ret = orig(orig1, self, node) |
|
830 | > ret = orig(orig1, self, node) | |
828 | > if wrapper._islfs(self._revlog, node) and ret: |
|
831 | > if wrapper._islfs(self._revlog, node) and ret: | |
829 | > rawtext = self._revlog.rawdata(node) |
|
832 | > rawtext = self._revlog.rawdata(node) | |
830 | > metadata = pointer.deserialize(rawtext) |
|
833 | > metadata = pointer.deserialize(rawtext) | |
831 | > print('lfs blob %s renamed %s -> %s' |
|
834 | > print('lfs blob %s renamed %s -> %s' | |
832 |
> % (metadata[b'oid'] |
|
835 | > % (pycompat.sysstr(metadata[b'oid']), | |
|
836 | > pycompat.sysstr(ret[0]), | |||
|
837 | > pycompat.fsdecode(self._revlog.filename))) | |||
|
838 | > sys.stdout.flush() | |||
833 |
|
|
839 | > return ret | |
834 | > EOF |
|
840 | > EOF | |
835 |
|
841 | |||
836 | $ hg -R fromcorrupt --config lfs.usercache=emptycache verify -v --no-lfs \ |
|
842 | $ hg -R fromcorrupt --config lfs.usercache=emptycache verify -v --no-lfs \ | |
837 | > --config extensions.x=$TESTTMP/lfsrename.py |
|
843 | > --config extensions.x=$TESTTMP/lfsrename.py | |
838 | repository uses revlog format 1 |
|
844 | repository uses revlog format 1 | |
839 | checking changesets |
|
845 | checking changesets | |
840 | checking manifests |
|
846 | checking manifests | |
841 | crosschecking files in changesets and manifests |
|
847 | crosschecking files in changesets and manifests | |
842 | checking files |
|
848 | checking files | |
843 | lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the local lfs store |
|
849 | lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the local lfs store | |
844 | lfs blob sha256:66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e renamed large -> l |
|
850 | lfs blob sha256:66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e renamed large -> l | |
845 | checked 5 changesets with 10 changes to 4 files |
|
851 | checked 5 changesets with 10 changes to 4 files | |
846 |
|
852 | |||
847 | Verify will not try to download lfs blobs, if told not to by the config option |
|
853 | Verify will not try to download lfs blobs, if told not to by the config option | |
848 |
|
854 | |||
849 | $ hg -R fromcorrupt --config lfs.usercache=emptycache verify -v \ |
|
855 | $ hg -R fromcorrupt --config lfs.usercache=emptycache verify -v \ | |
850 | > --config verify.skipflags=8192 \ |
|
856 | > --config verify.skipflags=8192 \ | |
851 | > --config extensions.x=$TESTTMP/lfsrename.py |
|
857 | > --config extensions.x=$TESTTMP/lfsrename.py | |
852 | repository uses revlog format 1 |
|
858 | repository uses revlog format 1 | |
853 | checking changesets |
|
859 | checking changesets | |
854 | checking manifests |
|
860 | checking manifests | |
855 | crosschecking files in changesets and manifests |
|
861 | crosschecking files in changesets and manifests | |
856 | checking files |
|
862 | checking files | |
857 | lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the local lfs store |
|
863 | lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the local lfs store | |
858 | lfs blob sha256:66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e renamed large -> l |
|
864 | lfs blob sha256:66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e renamed large -> l | |
859 | checked 5 changesets with 10 changes to 4 files |
|
865 | checked 5 changesets with 10 changes to 4 files | |
860 |
|
866 | |||
861 | Verify will copy/link all lfs objects into the local store that aren't already |
|
867 | Verify will copy/link all lfs objects into the local store that aren't already | |
862 | present. Bypass the corrupted usercache to show that verify works when fed by |
|
868 | present. Bypass the corrupted usercache to show that verify works when fed by | |
863 | the (uncorrupted) remote store. |
|
869 | the (uncorrupted) remote store. | |
864 |
|
870 | |||
865 | $ hg -R fromcorrupt --config lfs.usercache=emptycache verify -v |
|
871 | $ hg -R fromcorrupt --config lfs.usercache=emptycache verify -v | |
866 | repository uses revlog format 1 |
|
872 | repository uses revlog format 1 | |
867 | checking changesets |
|
873 | checking changesets | |
868 | checking manifests |
|
874 | checking manifests | |
869 | crosschecking files in changesets and manifests |
|
875 | crosschecking files in changesets and manifests | |
870 | checking files |
|
876 | checking files | |
871 | lfs: adding 66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e to the usercache |
|
877 | lfs: adding 66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e to the usercache | |
872 | lfs: found 66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e in the local lfs store |
|
878 | lfs: found 66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e in the local lfs store | |
873 | lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the local lfs store |
|
879 | lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the local lfs store | |
874 | lfs: found 66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e in the local lfs store |
|
880 | lfs: found 66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e in the local lfs store | |
875 | lfs: adding 89b6070915a3d573ff3599d1cda305bc5e38549b15c4847ab034169da66e1ca8 to the usercache |
|
881 | lfs: adding 89b6070915a3d573ff3599d1cda305bc5e38549b15c4847ab034169da66e1ca8 to the usercache | |
876 | lfs: found 89b6070915a3d573ff3599d1cda305bc5e38549b15c4847ab034169da66e1ca8 in the local lfs store |
|
882 | lfs: found 89b6070915a3d573ff3599d1cda305bc5e38549b15c4847ab034169da66e1ca8 in the local lfs store | |
877 | lfs: adding b1a6ea88da0017a0e77db139a54618986e9a2489bee24af9fe596de9daac498c to the usercache |
|
883 | lfs: adding b1a6ea88da0017a0e77db139a54618986e9a2489bee24af9fe596de9daac498c to the usercache | |
878 | lfs: found b1a6ea88da0017a0e77db139a54618986e9a2489bee24af9fe596de9daac498c in the local lfs store |
|
884 | lfs: found b1a6ea88da0017a0e77db139a54618986e9a2489bee24af9fe596de9daac498c in the local lfs store | |
879 | checked 5 changesets with 10 changes to 4 files |
|
885 | checked 5 changesets with 10 changes to 4 files | |
880 |
|
886 | |||
881 | Verify will not copy/link a corrupted file from the usercache into the local |
|
887 | Verify will not copy/link a corrupted file from the usercache into the local | |
882 | store, and poison it. (The verify with a good remote now works.) |
|
888 | store, and poison it. (The verify with a good remote now works.) | |
883 |
|
889 | |||
884 | $ rm -r fromcorrupt/.hg/store/lfs/objects/66/100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e |
|
890 | $ rm -r fromcorrupt/.hg/store/lfs/objects/66/100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e | |
885 | $ hg -R fromcorrupt verify -v |
|
891 | $ hg -R fromcorrupt verify -v | |
886 | repository uses revlog format 1 |
|
892 | repository uses revlog format 1 | |
887 | checking changesets |
|
893 | checking changesets | |
888 | checking manifests |
|
894 | checking manifests | |
889 | crosschecking files in changesets and manifests |
|
895 | crosschecking files in changesets and manifests | |
890 | checking files |
|
896 | checking files | |
891 | l@1: unpacking 46a2f24864bc: integrity check failed on data/l.i:0 |
|
897 | l@1: unpacking 46a2f24864bc: integrity check failed on data/l.i:0 | |
892 | lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the local lfs store |
|
898 | lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the local lfs store | |
893 | large@0: unpacking 2c531e0992ff: integrity check failed on data/large.i:0 |
|
899 | large@0: unpacking 2c531e0992ff: integrity check failed on data/large.i:0 | |
894 | lfs: found 89b6070915a3d573ff3599d1cda305bc5e38549b15c4847ab034169da66e1ca8 in the local lfs store |
|
900 | lfs: found 89b6070915a3d573ff3599d1cda305bc5e38549b15c4847ab034169da66e1ca8 in the local lfs store | |
895 | lfs: found b1a6ea88da0017a0e77db139a54618986e9a2489bee24af9fe596de9daac498c in the local lfs store |
|
901 | lfs: found b1a6ea88da0017a0e77db139a54618986e9a2489bee24af9fe596de9daac498c in the local lfs store | |
896 | checked 5 changesets with 10 changes to 4 files |
|
902 | checked 5 changesets with 10 changes to 4 files | |
897 | 2 integrity errors encountered! |
|
903 | 2 integrity errors encountered! | |
898 | (first damaged changeset appears to be 0) |
|
904 | (first damaged changeset appears to be 0) | |
899 | [1] |
|
905 | [1] | |
900 | $ hg -R fromcorrupt --config lfs.usercache=emptycache verify -v |
|
906 | $ hg -R fromcorrupt --config lfs.usercache=emptycache verify -v | |
901 | repository uses revlog format 1 |
|
907 | repository uses revlog format 1 | |
902 | checking changesets |
|
908 | checking changesets | |
903 | checking manifests |
|
909 | checking manifests | |
904 | crosschecking files in changesets and manifests |
|
910 | crosschecking files in changesets and manifests | |
905 | checking files |
|
911 | checking files | |
906 | lfs: found 66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e in the usercache |
|
912 | lfs: found 66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e in the usercache | |
907 | lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the local lfs store |
|
913 | lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the local lfs store | |
908 | lfs: found 66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e in the local lfs store |
|
914 | lfs: found 66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e in the local lfs store | |
909 | lfs: found 89b6070915a3d573ff3599d1cda305bc5e38549b15c4847ab034169da66e1ca8 in the local lfs store |
|
915 | lfs: found 89b6070915a3d573ff3599d1cda305bc5e38549b15c4847ab034169da66e1ca8 in the local lfs store | |
910 | lfs: found b1a6ea88da0017a0e77db139a54618986e9a2489bee24af9fe596de9daac498c in the local lfs store |
|
916 | lfs: found b1a6ea88da0017a0e77db139a54618986e9a2489bee24af9fe596de9daac498c in the local lfs store | |
911 | checked 5 changesets with 10 changes to 4 files |
|
917 | checked 5 changesets with 10 changes to 4 files | |
912 |
|
918 | |||
913 | Damaging a file required by the update destination fails the update. |
|
919 | Damaging a file required by the update destination fails the update. | |
914 |
|
920 | |||
915 | $ echo 'damage' >> $TESTTMP/dummy-remote/22/f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b |
|
921 | $ echo 'damage' >> $TESTTMP/dummy-remote/22/f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b | |
916 | $ hg --config lfs.usercache=emptycache clone -v repo5 fromcorrupt2 |
|
922 | $ hg --config lfs.usercache=emptycache clone -v repo5 fromcorrupt2 | |
917 | updating to branch default |
|
923 | updating to branch default | |
918 | resolving manifests |
|
924 | resolving manifests | |
919 | abort: corrupt remote lfs object: 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b |
|
925 | abort: corrupt remote lfs object: 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b | |
920 | [255] |
|
926 | [255] | |
921 |
|
927 | |||
922 | A corrupted lfs blob is not transferred from a file://remotestore to the |
|
928 | A corrupted lfs blob is not transferred from a file://remotestore to the | |
923 | usercache or local store. |
|
929 | usercache or local store. | |
924 |
|
930 | |||
925 | $ test -f emptycache/22/f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b |
|
931 | $ test -f emptycache/22/f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b | |
926 | [1] |
|
932 | [1] | |
927 | $ test -f fromcorrupt2/.hg/store/lfs/objects/22/f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b |
|
933 | $ test -f fromcorrupt2/.hg/store/lfs/objects/22/f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b | |
928 | [1] |
|
934 | [1] | |
929 |
|
935 | |||
930 | $ hg -R fromcorrupt2 verify |
|
936 | $ hg -R fromcorrupt2 verify | |
931 | checking changesets |
|
937 | checking changesets | |
932 | checking manifests |
|
938 | checking manifests | |
933 | crosschecking files in changesets and manifests |
|
939 | crosschecking files in changesets and manifests | |
934 | checking files |
|
940 | checking files | |
935 | l@1: unpacking 46a2f24864bc: integrity check failed on data/l.i:0 |
|
941 | l@1: unpacking 46a2f24864bc: integrity check failed on data/l.i:0 | |
936 | large@0: unpacking 2c531e0992ff: integrity check failed on data/large.i:0 |
|
942 | large@0: unpacking 2c531e0992ff: integrity check failed on data/large.i:0 | |
937 | checked 5 changesets with 10 changes to 4 files |
|
943 | checked 5 changesets with 10 changes to 4 files | |
938 | 2 integrity errors encountered! |
|
944 | 2 integrity errors encountered! | |
939 | (first damaged changeset appears to be 0) |
|
945 | (first damaged changeset appears to be 0) | |
940 | [1] |
|
946 | [1] | |
941 |
|
947 | |||
942 | Corrupt local files are not sent upstream. (The alternate dummy remote |
|
948 | Corrupt local files are not sent upstream. (The alternate dummy remote | |
943 | avoids the corrupt lfs object in the original remote.) |
|
949 | avoids the corrupt lfs object in the original remote.) | |
944 |
|
950 | |||
945 | $ mkdir $TESTTMP/dummy-remote2 |
|
951 | $ mkdir $TESTTMP/dummy-remote2 | |
946 | $ hg init dest |
|
952 | $ hg init dest | |
947 | $ hg -R fromcorrupt2 --config lfs.url=file:///$TESTTMP/dummy-remote2 push -v dest |
|
953 | $ hg -R fromcorrupt2 --config lfs.url=file:///$TESTTMP/dummy-remote2 push -v dest | |
948 | pushing to dest |
|
954 | pushing to dest | |
949 | searching for changes |
|
955 | searching for changes | |
950 | lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the local lfs store |
|
956 | lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the local lfs store | |
951 | abort: detected corrupt lfs object: 66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e |
|
957 | abort: detected corrupt lfs object: 66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e | |
952 | (run hg verify) |
|
958 | (run hg verify) | |
953 | [255] |
|
959 | [255] | |
954 |
|
960 | |||
955 | $ hg -R fromcorrupt2 --config lfs.url=file:///$TESTTMP/dummy-remote2 verify -v |
|
961 | $ hg -R fromcorrupt2 --config lfs.url=file:///$TESTTMP/dummy-remote2 verify -v | |
956 | repository uses revlog format 1 |
|
962 | repository uses revlog format 1 | |
957 | checking changesets |
|
963 | checking changesets | |
958 | checking manifests |
|
964 | checking manifests | |
959 | crosschecking files in changesets and manifests |
|
965 | crosschecking files in changesets and manifests | |
960 | checking files |
|
966 | checking files | |
961 | l@1: unpacking 46a2f24864bc: integrity check failed on data/l.i:0 |
|
967 | l@1: unpacking 46a2f24864bc: integrity check failed on data/l.i:0 | |
962 | lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the local lfs store |
|
968 | lfs: found 22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b in the local lfs store | |
963 | large@0: unpacking 2c531e0992ff: integrity check failed on data/large.i:0 |
|
969 | large@0: unpacking 2c531e0992ff: integrity check failed on data/large.i:0 | |
964 | lfs: found 89b6070915a3d573ff3599d1cda305bc5e38549b15c4847ab034169da66e1ca8 in the local lfs store |
|
970 | lfs: found 89b6070915a3d573ff3599d1cda305bc5e38549b15c4847ab034169da66e1ca8 in the local lfs store | |
965 | lfs: found b1a6ea88da0017a0e77db139a54618986e9a2489bee24af9fe596de9daac498c in the local lfs store |
|
971 | lfs: found b1a6ea88da0017a0e77db139a54618986e9a2489bee24af9fe596de9daac498c in the local lfs store | |
966 | checked 5 changesets with 10 changes to 4 files |
|
972 | checked 5 changesets with 10 changes to 4 files | |
967 | 2 integrity errors encountered! |
|
973 | 2 integrity errors encountered! | |
968 | (first damaged changeset appears to be 0) |
|
974 | (first damaged changeset appears to be 0) | |
969 | [1] |
|
975 | [1] | |
970 |
|
976 | |||
971 | $ cat $TESTTMP/dummy-remote2/22/f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b | $TESTDIR/f --sha256 |
|
977 | $ cat $TESTTMP/dummy-remote2/22/f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b | $TESTDIR/f --sha256 | |
972 | sha256=22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b |
|
978 | sha256=22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b | |
973 | $ cat fromcorrupt2/.hg/store/lfs/objects/22/f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b | $TESTDIR/f --sha256 |
|
979 | $ cat fromcorrupt2/.hg/store/lfs/objects/22/f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b | $TESTDIR/f --sha256 | |
974 | sha256=22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b |
|
980 | sha256=22f66a3fc0b9bf3f012c814303995ec07099b3a9ce02a7af84b5970811074a3b | |
975 | $ test -f $TESTTMP/dummy-remote2/66/100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e |
|
981 | $ test -f $TESTTMP/dummy-remote2/66/100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e | |
976 | [1] |
|
982 | [1] | |
977 |
|
983 | |||
978 | Accessing a corrupt file will complain |
|
984 | Accessing a corrupt file will complain | |
979 |
|
985 | |||
980 | $ hg --cwd fromcorrupt2 cat -r 0 large |
|
986 | $ hg --cwd fromcorrupt2 cat -r 0 large | |
981 | abort: integrity check failed on data/large.i:0! |
|
987 | abort: integrity check failed on data/large.i:0! | |
982 | [255] |
|
988 | [255] | |
983 |
|
989 | |||
984 | lfs -> normal -> lfs round trip conversions are possible. The 'none()' |
|
990 | lfs -> normal -> lfs round trip conversions are possible. The 'none()' | |
985 | predicate on the command line will override whatever is configured globally and |
|
991 | predicate on the command line will override whatever is configured globally and | |
986 | locally, and ensures everything converts to a regular file. For lfs -> normal, |
|
992 | locally, and ensures everything converts to a regular file. For lfs -> normal, | |
987 | there's no 'lfs' destination repo requirement. For normal -> lfs, there is. |
|
993 | there's no 'lfs' destination repo requirement. For normal -> lfs, there is. | |
988 |
|
994 | |||
989 | $ hg --config extensions.convert= --config 'lfs.track=none()' \ |
|
995 | $ hg --config extensions.convert= --config 'lfs.track=none()' \ | |
990 | > convert repo8 convert_normal |
|
996 | > convert repo8 convert_normal | |
991 | initializing destination convert_normal repository |
|
997 | initializing destination convert_normal repository | |
992 | scanning source... |
|
998 | scanning source... | |
993 | sorting... |
|
999 | sorting... | |
994 | converting... |
|
1000 | converting... | |
995 | 2 a |
|
1001 | 2 a | |
996 | 1 b |
|
1002 | 1 b | |
997 | 0 meta |
|
1003 | 0 meta | |
998 | $ grep 'lfs' convert_normal/.hg/requires |
|
1004 | $ grep 'lfs' convert_normal/.hg/requires | |
999 | [1] |
|
1005 | [1] | |
1000 | $ hg --cwd convert_normal cat a1 -r 0 -T '{rawdata}' |
|
1006 | $ hg --cwd convert_normal cat a1 -r 0 -T '{rawdata}' | |
1001 | THIS-IS-LFS-BECAUSE-10-BYTES |
|
1007 | THIS-IS-LFS-BECAUSE-10-BYTES | |
1002 |
|
1008 | |||
1003 | $ hg --config extensions.convert= --config lfs.threshold=10B \ |
|
1009 | $ hg --config extensions.convert= --config lfs.threshold=10B \ | |
1004 | > convert convert_normal convert_lfs |
|
1010 | > convert convert_normal convert_lfs | |
1005 | initializing destination convert_lfs repository |
|
1011 | initializing destination convert_lfs repository | |
1006 | scanning source... |
|
1012 | scanning source... | |
1007 | sorting... |
|
1013 | sorting... | |
1008 | converting... |
|
1014 | converting... | |
1009 | 2 a |
|
1015 | 2 a | |
1010 | 1 b |
|
1016 | 1 b | |
1011 | 0 meta |
|
1017 | 0 meta | |
1012 |
|
1018 | |||
1013 | $ hg --cwd convert_lfs cat -r 0 a1 -T '{rawdata}' |
|
1019 | $ hg --cwd convert_lfs cat -r 0 a1 -T '{rawdata}' | |
1014 | version https://git-lfs.github.com/spec/v1 |
|
1020 | version https://git-lfs.github.com/spec/v1 | |
1015 | oid sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 |
|
1021 | oid sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 | |
1016 | size 29 |
|
1022 | size 29 | |
1017 | x-is-binary 0 |
|
1023 | x-is-binary 0 | |
1018 | $ hg --cwd convert_lfs debugdata a1 0 |
|
1024 | $ hg --cwd convert_lfs debugdata a1 0 | |
1019 | version https://git-lfs.github.com/spec/v1 |
|
1025 | version https://git-lfs.github.com/spec/v1 | |
1020 | oid sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 |
|
1026 | oid sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 | |
1021 | size 29 |
|
1027 | size 29 | |
1022 | x-is-binary 0 |
|
1028 | x-is-binary 0 | |
1023 | $ hg --cwd convert_lfs log -r 0 -T "{lfs_files % '{lfspointer % '{key}={value}\n'}'}" |
|
1029 | $ hg --cwd convert_lfs log -r 0 -T "{lfs_files % '{lfspointer % '{key}={value}\n'}'}" | |
1024 | version=https://git-lfs.github.com/spec/v1 |
|
1030 | version=https://git-lfs.github.com/spec/v1 | |
1025 | oid=sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 |
|
1031 | oid=sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 | |
1026 | size=29 |
|
1032 | size=29 | |
1027 | x-is-binary=0 |
|
1033 | x-is-binary=0 | |
1028 | $ hg --cwd convert_lfs log -r 0 \ |
|
1034 | $ hg --cwd convert_lfs log -r 0 \ | |
1029 | > -T '{lfs_files % "{get(lfspointer, "oid")}\n"}{lfs_files % "{lfspointer.oid}\n"}' |
|
1035 | > -T '{lfs_files % "{get(lfspointer, "oid")}\n"}{lfs_files % "{lfspointer.oid}\n"}' | |
1030 | sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 |
|
1036 | sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 | |
1031 | sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 |
|
1037 | sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 | |
1032 | $ hg --cwd convert_lfs log -r 0 -T '{lfs_files % "{lfspointer}\n"}' |
|
1038 | $ hg --cwd convert_lfs log -r 0 -T '{lfs_files % "{lfspointer}\n"}' | |
1033 | version=https://git-lfs.github.com/spec/v1 oid=sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 size=29 x-is-binary=0 |
|
1039 | version=https://git-lfs.github.com/spec/v1 oid=sha256:5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 size=29 x-is-binary=0 | |
1034 | $ hg --cwd convert_lfs \ |
|
1040 | $ hg --cwd convert_lfs \ | |
1035 | > log -r 'all()' -T '{rev}: {lfs_files % "{file}: {lfsoid}\n"}' |
|
1041 | > log -r 'all()' -T '{rev}: {lfs_files % "{file}: {lfsoid}\n"}' | |
1036 | 0: a1: 5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 |
|
1042 | 0: a1: 5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 | |
1037 | 1: a2: 5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 |
|
1043 | 1: a2: 5bb8341bee63b3649f222b2215bde37322bea075a30575aa685d8f8d21c77024 | |
1038 | 2: a2: 876dadc86a8542f9798048f2c47f51dbf8e4359aed883e8ec80c5db825f0d943 |
|
1044 | 2: a2: 876dadc86a8542f9798048f2c47f51dbf8e4359aed883e8ec80c5db825f0d943 | |
1039 |
|
1045 | |||
1040 | $ grep 'lfs' convert_lfs/.hg/requires |
|
1046 | $ grep 'lfs' convert_lfs/.hg/requires | |
1041 | lfs |
|
1047 | lfs | |
1042 |
|
1048 | |||
1043 | The hashes in all stages of the conversion are unchanged. |
|
1049 | The hashes in all stages of the conversion are unchanged. | |
1044 |
|
1050 | |||
1045 | $ hg -R repo8 log -T '{node|short}\n' |
|
1051 | $ hg -R repo8 log -T '{node|short}\n' | |
1046 | 0fae949de7fa |
|
1052 | 0fae949de7fa | |
1047 | 9cd6bdffdac0 |
|
1053 | 9cd6bdffdac0 | |
1048 | 7f96794915f7 |
|
1054 | 7f96794915f7 | |
1049 | $ hg -R convert_normal log -T '{node|short}\n' |
|
1055 | $ hg -R convert_normal log -T '{node|short}\n' | |
1050 | 0fae949de7fa |
|
1056 | 0fae949de7fa | |
1051 | 9cd6bdffdac0 |
|
1057 | 9cd6bdffdac0 | |
1052 | 7f96794915f7 |
|
1058 | 7f96794915f7 | |
1053 | $ hg -R convert_lfs log -T '{node|short}\n' |
|
1059 | $ hg -R convert_lfs log -T '{node|short}\n' | |
1054 | 0fae949de7fa |
|
1060 | 0fae949de7fa | |
1055 | 9cd6bdffdac0 |
|
1061 | 9cd6bdffdac0 | |
1056 | 7f96794915f7 |
|
1062 | 7f96794915f7 | |
1057 |
|
1063 | |||
1058 | This convert is trickier, because it contains deleted files (via `hg mv`) |
|
1064 | This convert is trickier, because it contains deleted files (via `hg mv`) | |
1059 |
|
1065 | |||
1060 | $ hg --config extensions.convert= --config lfs.threshold=1000M \ |
|
1066 | $ hg --config extensions.convert= --config lfs.threshold=1000M \ | |
1061 | > convert repo3 convert_normal2 |
|
1067 | > convert repo3 convert_normal2 | |
1062 | initializing destination convert_normal2 repository |
|
1068 | initializing destination convert_normal2 repository | |
1063 | scanning source... |
|
1069 | scanning source... | |
1064 | sorting... |
|
1070 | sorting... | |
1065 | converting... |
|
1071 | converting... | |
1066 | 4 commit with lfs content |
|
1072 | 4 commit with lfs content | |
1067 | 3 renames |
|
1073 | 3 renames | |
1068 | 2 large to small, small to large |
|
1074 | 2 large to small, small to large | |
1069 | 1 random modifications |
|
1075 | 1 random modifications | |
1070 | 0 switch large and small again |
|
1076 | 0 switch large and small again | |
1071 | $ grep 'lfs' convert_normal2/.hg/requires |
|
1077 | $ grep 'lfs' convert_normal2/.hg/requires | |
1072 | [1] |
|
1078 | [1] | |
1073 | $ hg --cwd convert_normal2 debugdata large 0 |
|
1079 | $ hg --cwd convert_normal2 debugdata large 0 | |
1074 | LONGER-THAN-TEN-BYTES-WILL-TRIGGER-LFS |
|
1080 | LONGER-THAN-TEN-BYTES-WILL-TRIGGER-LFS | |
1075 |
|
1081 | |||
1076 | $ hg --config extensions.convert= --config lfs.threshold=10B \ |
|
1082 | $ hg --config extensions.convert= --config lfs.threshold=10B \ | |
1077 | > convert convert_normal2 convert_lfs2 |
|
1083 | > convert convert_normal2 convert_lfs2 | |
1078 | initializing destination convert_lfs2 repository |
|
1084 | initializing destination convert_lfs2 repository | |
1079 | scanning source... |
|
1085 | scanning source... | |
1080 | sorting... |
|
1086 | sorting... | |
1081 | converting... |
|
1087 | converting... | |
1082 | 4 commit with lfs content |
|
1088 | 4 commit with lfs content | |
1083 | 3 renames |
|
1089 | 3 renames | |
1084 | 2 large to small, small to large |
|
1090 | 2 large to small, small to large | |
1085 | 1 random modifications |
|
1091 | 1 random modifications | |
1086 | 0 switch large and small again |
|
1092 | 0 switch large and small again | |
1087 | $ grep 'lfs' convert_lfs2/.hg/requires |
|
1093 | $ grep 'lfs' convert_lfs2/.hg/requires | |
1088 | lfs |
|
1094 | lfs | |
1089 | $ hg --cwd convert_lfs2 debugdata large 0 |
|
1095 | $ hg --cwd convert_lfs2 debugdata large 0 | |
1090 | version https://git-lfs.github.com/spec/v1 |
|
1096 | version https://git-lfs.github.com/spec/v1 | |
1091 | oid sha256:66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e |
|
1097 | oid sha256:66100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e | |
1092 | size 39 |
|
1098 | size 39 | |
1093 | x-is-binary 0 |
|
1099 | x-is-binary 0 | |
1094 |
|
1100 | |||
1095 | Committing deleted files works: |
|
1101 | Committing deleted files works: | |
1096 |
|
1102 | |||
1097 | $ hg init $TESTTMP/repo-del |
|
1103 | $ hg init $TESTTMP/repo-del | |
1098 | $ cd $TESTTMP/repo-del |
|
1104 | $ cd $TESTTMP/repo-del | |
1099 | $ echo 1 > A |
|
1105 | $ echo 1 > A | |
1100 | $ hg commit -m 'add A' -A A |
|
1106 | $ hg commit -m 'add A' -A A | |
1101 | $ hg rm A |
|
1107 | $ hg rm A | |
1102 | $ hg commit -m 'rm A' |
|
1108 | $ hg commit -m 'rm A' | |
1103 |
|
1109 | |||
1104 | Bad .hglfs files will block the commit with a useful message |
|
1110 | Bad .hglfs files will block the commit with a useful message | |
1105 |
|
1111 | |||
1106 | $ cat > .hglfs << EOF |
|
1112 | $ cat > .hglfs << EOF | |
1107 | > [track] |
|
1113 | > [track] | |
1108 | > **.test = size(">5B") |
|
1114 | > **.test = size(">5B") | |
1109 | > bad file ... no commit |
|
1115 | > bad file ... no commit | |
1110 | > EOF |
|
1116 | > EOF | |
1111 |
|
1117 | |||
1112 | $ echo x > file.txt |
|
1118 | $ echo x > file.txt | |
1113 | $ hg ci -Aqm 'should fail' |
|
1119 | $ hg ci -Aqm 'should fail' | |
1114 | hg: parse error at .hglfs:3: bad file ... no commit |
|
1120 | hg: parse error at .hglfs:3: bad file ... no commit | |
1115 | [255] |
|
1121 | [255] | |
1116 |
|
1122 | |||
1117 | $ cat > .hglfs << EOF |
|
1123 | $ cat > .hglfs << EOF | |
1118 | > [track] |
|
1124 | > [track] | |
1119 | > **.test = size(">5B") |
|
1125 | > **.test = size(">5B") | |
1120 | > ** = nonexistent() |
|
1126 | > ** = nonexistent() | |
1121 | > EOF |
|
1127 | > EOF | |
1122 |
|
1128 | |||
1123 | $ hg ci -Aqm 'should fail' |
|
1129 | $ hg ci -Aqm 'should fail' | |
1124 | abort: parse error in .hglfs: unknown identifier: nonexistent |
|
1130 | abort: parse error in .hglfs: unknown identifier: nonexistent | |
1125 | [255] |
|
1131 | [255] | |
1126 |
|
1132 | |||
1127 | '**' works out to mean all files. |
|
1133 | '**' works out to mean all files. | |
1128 |
|
1134 | |||
1129 | $ cat > .hglfs << EOF |
|
1135 | $ cat > .hglfs << EOF | |
1130 | > [track] |
|
1136 | > [track] | |
1131 | > path:.hglfs = none() |
|
1137 | > path:.hglfs = none() | |
1132 | > **.test = size(">5B") |
|
1138 | > **.test = size(">5B") | |
1133 | > **.exclude = none() |
|
1139 | > **.exclude = none() | |
1134 | > ** = size(">10B") |
|
1140 | > ** = size(">10B") | |
1135 | > EOF |
|
1141 | > EOF | |
1136 |
|
1142 | |||
1137 | The LFS policy takes effect without tracking the .hglfs file |
|
1143 | The LFS policy takes effect without tracking the .hglfs file | |
1138 |
|
1144 | |||
1139 | $ echo 'largefile' > lfs.test |
|
1145 | $ echo 'largefile' > lfs.test | |
1140 | $ echo '012345678901234567890' > nolfs.exclude |
|
1146 | $ echo '012345678901234567890' > nolfs.exclude | |
1141 | $ echo '01234567890123456' > lfs.catchall |
|
1147 | $ echo '01234567890123456' > lfs.catchall | |
1142 | $ hg add * |
|
1148 | $ hg add * | |
1143 | $ hg ci -qm 'before add .hglfs' |
|
1149 | $ hg ci -qm 'before add .hglfs' | |
1144 | $ hg log -r . -T '{rev}: {lfs_files % "{file}: {lfsoid}\n"}\n' |
|
1150 | $ hg log -r . -T '{rev}: {lfs_files % "{file}: {lfsoid}\n"}\n' | |
1145 | 2: lfs.catchall: d4ec46c2869ba22eceb42a729377432052d9dd75d82fc40390ebaadecee87ee9 |
|
1151 | 2: lfs.catchall: d4ec46c2869ba22eceb42a729377432052d9dd75d82fc40390ebaadecee87ee9 | |
1146 | lfs.test: 5489e6ced8c36a7b267292bde9fd5242a5f80a7482e8f23fa0477393dfaa4d6c |
|
1152 | lfs.test: 5489e6ced8c36a7b267292bde9fd5242a5f80a7482e8f23fa0477393dfaa4d6c | |
1147 |
|
1153 | |||
1148 | The .hglfs file works when tracked |
|
1154 | The .hglfs file works when tracked | |
1149 |
|
1155 | |||
1150 | $ echo 'largefile2' > lfs.test |
|
1156 | $ echo 'largefile2' > lfs.test | |
1151 | $ echo '012345678901234567890a' > nolfs.exclude |
|
1157 | $ echo '012345678901234567890a' > nolfs.exclude | |
1152 | $ echo '01234567890123456a' > lfs.catchall |
|
1158 | $ echo '01234567890123456a' > lfs.catchall | |
1153 | $ hg ci -Aqm 'after adding .hglfs' |
|
1159 | $ hg ci -Aqm 'after adding .hglfs' | |
1154 | $ hg log -r . -T '{rev}: {lfs_files % "{file}: {lfsoid}\n"}\n' |
|
1160 | $ hg log -r . -T '{rev}: {lfs_files % "{file}: {lfsoid}\n"}\n' | |
1155 | 3: lfs.catchall: 31f43b9c62b540126b0ad5884dc013d21a61c9329b77de1fceeae2fc58511573 |
|
1161 | 3: lfs.catchall: 31f43b9c62b540126b0ad5884dc013d21a61c9329b77de1fceeae2fc58511573 | |
1156 | lfs.test: 8acd23467967bc7b8cc5a280056589b0ba0b17ff21dbd88a7b6474d6290378a6 |
|
1162 | lfs.test: 8acd23467967bc7b8cc5a280056589b0ba0b17ff21dbd88a7b6474d6290378a6 | |
1157 |
|
1163 | |||
1158 | The LFS policy stops when the .hglfs is gone |
|
1164 | The LFS policy stops when the .hglfs is gone | |
1159 |
|
1165 | |||
1160 | $ mv .hglfs .hglfs_ |
|
1166 | $ mv .hglfs .hglfs_ | |
1161 | $ echo 'largefile3' > lfs.test |
|
1167 | $ echo 'largefile3' > lfs.test | |
1162 | $ echo '012345678901234567890abc' > nolfs.exclude |
|
1168 | $ echo '012345678901234567890abc' > nolfs.exclude | |
1163 | $ echo '01234567890123456abc' > lfs.catchall |
|
1169 | $ echo '01234567890123456abc' > lfs.catchall | |
1164 | $ hg ci -qm 'file test' -X .hglfs |
|
1170 | $ hg ci -qm 'file test' -X .hglfs | |
1165 | $ hg log -r . -T '{rev}: {lfs_files % "{file}: {lfsoid}\n"}\n' |
|
1171 | $ hg log -r . -T '{rev}: {lfs_files % "{file}: {lfsoid}\n"}\n' | |
1166 | 4: |
|
1172 | 4: | |
1167 |
|
1173 | |||
1168 | $ mv .hglfs_ .hglfs |
|
1174 | $ mv .hglfs_ .hglfs | |
1169 | $ echo '012345678901234567890abc' > lfs.test |
|
1175 | $ echo '012345678901234567890abc' > lfs.test | |
1170 | $ hg ci -m 'back to lfs' |
|
1176 | $ hg ci -m 'back to lfs' | |
1171 | $ hg rm lfs.test |
|
1177 | $ hg rm lfs.test | |
1172 | $ hg ci -qm 'remove lfs' |
|
1178 | $ hg ci -qm 'remove lfs' | |
1173 |
|
1179 | |||
1174 | {lfs_files} will list deleted files too |
|
1180 | {lfs_files} will list deleted files too | |
1175 |
|
1181 | |||
1176 | $ hg log -T "{lfs_files % '{rev} {file}: {lfspointer.oid}\n'}" |
|
1182 | $ hg log -T "{lfs_files % '{rev} {file}: {lfspointer.oid}\n'}" | |
1177 | 6 lfs.test: |
|
1183 | 6 lfs.test: | |
1178 | 5 lfs.test: sha256:43f8f41171b6f62a6b61ba4ce98a8a6c1649240a47ebafd43120aa215ac9e7f6 |
|
1184 | 5 lfs.test: sha256:43f8f41171b6f62a6b61ba4ce98a8a6c1649240a47ebafd43120aa215ac9e7f6 | |
1179 | 3 lfs.catchall: sha256:31f43b9c62b540126b0ad5884dc013d21a61c9329b77de1fceeae2fc58511573 |
|
1185 | 3 lfs.catchall: sha256:31f43b9c62b540126b0ad5884dc013d21a61c9329b77de1fceeae2fc58511573 | |
1180 | 3 lfs.test: sha256:8acd23467967bc7b8cc5a280056589b0ba0b17ff21dbd88a7b6474d6290378a6 |
|
1186 | 3 lfs.test: sha256:8acd23467967bc7b8cc5a280056589b0ba0b17ff21dbd88a7b6474d6290378a6 | |
1181 | 2 lfs.catchall: sha256:d4ec46c2869ba22eceb42a729377432052d9dd75d82fc40390ebaadecee87ee9 |
|
1187 | 2 lfs.catchall: sha256:d4ec46c2869ba22eceb42a729377432052d9dd75d82fc40390ebaadecee87ee9 | |
1182 | 2 lfs.test: sha256:5489e6ced8c36a7b267292bde9fd5242a5f80a7482e8f23fa0477393dfaa4d6c |
|
1188 | 2 lfs.test: sha256:5489e6ced8c36a7b267292bde9fd5242a5f80a7482e8f23fa0477393dfaa4d6c | |
1183 |
|
1189 | |||
1184 | $ hg log -r 'file("set:lfs()")' -T '{rev} {join(lfs_files, ", ")}\n' |
|
1190 | $ hg log -r 'file("set:lfs()")' -T '{rev} {join(lfs_files, ", ")}\n' | |
1185 | 2 lfs.catchall, lfs.test |
|
1191 | 2 lfs.catchall, lfs.test | |
1186 | 3 lfs.catchall, lfs.test |
|
1192 | 3 lfs.catchall, lfs.test | |
1187 | 5 lfs.test |
|
1193 | 5 lfs.test | |
1188 | 6 lfs.test |
|
1194 | 6 lfs.test | |
1189 |
|
1195 | |||
1190 | $ cd .. |
|
1196 | $ cd .. | |
1191 |
|
1197 | |||
1192 | Unbundling adds a requirement to a non-lfs repo, if necessary. |
|
1198 | Unbundling adds a requirement to a non-lfs repo, if necessary. | |
1193 |
|
1199 | |||
1194 | $ hg bundle -R $TESTTMP/repo-del -qr 0 --base null nolfs.hg |
|
1200 | $ hg bundle -R $TESTTMP/repo-del -qr 0 --base null nolfs.hg | |
1195 | $ hg bundle -R convert_lfs2 -qr tip --base null lfs.hg |
|
1201 | $ hg bundle -R convert_lfs2 -qr tip --base null lfs.hg | |
1196 | $ hg init unbundle |
|
1202 | $ hg init unbundle | |
1197 | $ hg pull -R unbundle -q nolfs.hg |
|
1203 | $ hg pull -R unbundle -q nolfs.hg | |
1198 | $ grep lfs unbundle/.hg/requires |
|
1204 | $ grep lfs unbundle/.hg/requires | |
1199 | [1] |
|
1205 | [1] | |
1200 | $ hg pull -R unbundle -q lfs.hg |
|
1206 | $ hg pull -R unbundle -q lfs.hg | |
1201 | $ grep lfs unbundle/.hg/requires |
|
1207 | $ grep lfs unbundle/.hg/requires | |
1202 | lfs |
|
1208 | lfs | |
1203 |
|
1209 | |||
1204 | $ hg init no_lfs |
|
1210 | $ hg init no_lfs | |
1205 | $ cat >> no_lfs/.hg/hgrc <<EOF |
|
1211 | $ cat >> no_lfs/.hg/hgrc <<EOF | |
1206 | > [experimental] |
|
1212 | > [experimental] | |
1207 | > changegroup3 = True |
|
1213 | > changegroup3 = True | |
1208 | > [extensions] |
|
1214 | > [extensions] | |
1209 | > lfs=! |
|
1215 | > lfs=! | |
1210 | > EOF |
|
1216 | > EOF | |
1211 | $ cp -R no_lfs no_lfs2 |
|
1217 | $ cp -R no_lfs no_lfs2 | |
1212 |
|
1218 | |||
1213 | Pushing from a local lfs repo to a local repo without an lfs requirement and |
|
1219 | Pushing from a local lfs repo to a local repo without an lfs requirement and | |
1214 | with lfs disabled, fails. |
|
1220 | with lfs disabled, fails. | |
1215 |
|
1221 | |||
1216 | $ hg push -R convert_lfs2 no_lfs |
|
1222 | $ hg push -R convert_lfs2 no_lfs | |
1217 | pushing to no_lfs |
|
1223 | pushing to no_lfs | |
1218 | abort: required features are not supported in the destination: lfs |
|
1224 | abort: required features are not supported in the destination: lfs | |
1219 | [255] |
|
1225 | [255] | |
1220 | $ grep lfs no_lfs/.hg/requires |
|
1226 | $ grep lfs no_lfs/.hg/requires | |
1221 | [1] |
|
1227 | [1] | |
1222 |
|
1228 | |||
1223 | Pulling from a local lfs repo to a local repo without an lfs requirement and |
|
1229 | Pulling from a local lfs repo to a local repo without an lfs requirement and | |
1224 | with lfs disabled, fails. |
|
1230 | with lfs disabled, fails. | |
1225 |
|
1231 | |||
1226 | $ hg pull -R no_lfs2 convert_lfs2 |
|
1232 | $ hg pull -R no_lfs2 convert_lfs2 | |
1227 | pulling from convert_lfs2 |
|
1233 | pulling from convert_lfs2 | |
1228 | abort: required features are not supported in the destination: lfs |
|
1234 | abort: required features are not supported in the destination: lfs | |
1229 | [255] |
|
1235 | [255] | |
1230 | $ grep lfs no_lfs2/.hg/requires |
|
1236 | $ grep lfs no_lfs2/.hg/requires | |
1231 | [1] |
|
1237 | [1] |
General Comments 0
You need to be logged in to leave comments.
Login now