##// END OF EJS Templates
test: simpler requirements matching in test-lfs-largefiles.t...
marmoute -
r49507:9e11a06b default
parent child Browse files
Show More
@@ -1,360 +1,351
1 #require no-reposimplestore no-chg
1 #require no-reposimplestore no-chg
2
2
3 This tests the interaction between the largefiles and lfs extensions, and
3 This tests the interaction between the largefiles and lfs extensions, and
4 conversion from largefiles -> lfs.
4 conversion from largefiles -> lfs.
5
5
6 $ cat >> $HGRCPATH << EOF
6 $ cat >> $HGRCPATH << EOF
7 > [extensions]
7 > [extensions]
8 > largefiles =
8 > largefiles =
9 >
9 >
10 > [lfs]
10 > [lfs]
11 > # standin files are 41 bytes. Stay bigger for clarity.
11 > # standin files are 41 bytes. Stay bigger for clarity.
12 > threshold = 42
12 > threshold = 42
13 > EOF
13 > EOF
14
14
15 Setup a repo with a normal file and a largefile, above and below the lfs
15 Setup a repo with a normal file and a largefile, above and below the lfs
16 threshold to test lfconvert. *.txt start life as a normal file; *.bin start as
16 threshold to test lfconvert. *.txt start life as a normal file; *.bin start as
17 an lfs/largefile.
17 an lfs/largefile.
18
18
19 $ hg init largefiles
19 $ hg init largefiles
20 $ cd largefiles
20 $ cd largefiles
21 $ echo 'normal' > normal.txt
21 $ echo 'normal' > normal.txt
22 $ echo 'normal above lfs threshold 0000000000000000000000000' > lfs.txt
22 $ echo 'normal above lfs threshold 0000000000000000000000000' > lfs.txt
23 $ hg ci -Am 'normal.txt'
23 $ hg ci -Am 'normal.txt'
24 adding lfs.txt
24 adding lfs.txt
25 adding normal.txt
25 adding normal.txt
26 $ echo 'largefile' > large.bin
26 $ echo 'largefile' > large.bin
27 $ echo 'largefile above lfs threshold 0000000000000000000000' > lfs.bin
27 $ echo 'largefile above lfs threshold 0000000000000000000000' > lfs.bin
28 $ hg add --large large.bin lfs.bin
28 $ hg add --large large.bin lfs.bin
29 $ hg ci -m 'add largefiles'
29 $ hg ci -m 'add largefiles'
30
30
31 $ cat >> $HGRCPATH << EOF
31 $ cat >> $HGRCPATH << EOF
32 > [extensions]
32 > [extensions]
33 > lfs =
33 > lfs =
34 > EOF
34 > EOF
35
35
36 Add an lfs file and normal file that collide with files on the other branch.
36 Add an lfs file and normal file that collide with files on the other branch.
37 large.bin is added as a normal file, and is named as such only to clash with the
37 large.bin is added as a normal file, and is named as such only to clash with the
38 largefile on the other branch.
38 largefile on the other branch.
39
39
40 $ hg up -q '.^'
40 $ hg up -q '.^'
41 $ echo 'below lfs threshold' > large.bin
41 $ echo 'below lfs threshold' > large.bin
42 $ echo 'lfs above the lfs threshold for length 0000000000000' > lfs.bin
42 $ echo 'lfs above the lfs threshold for length 0000000000000' > lfs.bin
43 $ hg ci -Am 'add with lfs extension'
43 $ hg ci -Am 'add with lfs extension'
44 adding large.bin
44 adding large.bin
45 adding lfs.bin
45 adding lfs.bin
46 created new head
46 created new head
47
47
48 $ hg log -G
48 $ hg log -G
49 @ changeset: 2:e989d0fa3764
49 @ changeset: 2:e989d0fa3764
50 | tag: tip
50 | tag: tip
51 | parent: 0:29361292f54d
51 | parent: 0:29361292f54d
52 | user: test
52 | user: test
53 | date: Thu Jan 01 00:00:00 1970 +0000
53 | date: Thu Jan 01 00:00:00 1970 +0000
54 | summary: add with lfs extension
54 | summary: add with lfs extension
55 |
55 |
56 | o changeset: 1:6513aaab9ca0
56 | o changeset: 1:6513aaab9ca0
57 |/ user: test
57 |/ user: test
58 | date: Thu Jan 01 00:00:00 1970 +0000
58 | date: Thu Jan 01 00:00:00 1970 +0000
59 | summary: add largefiles
59 | summary: add largefiles
60 |
60 |
61 o changeset: 0:29361292f54d
61 o changeset: 0:29361292f54d
62 user: test
62 user: test
63 date: Thu Jan 01 00:00:00 1970 +0000
63 date: Thu Jan 01 00:00:00 1970 +0000
64 summary: normal.txt
64 summary: normal.txt
65
65
66 --------------------------------------------------------------------------------
66 --------------------------------------------------------------------------------
67 Merge largefiles into lfs branch
67 Merge largefiles into lfs branch
68
68
69 The largefiles extension will prompt to use the normal or largefile when merged
69 The largefiles extension will prompt to use the normal or largefile when merged
70 into the lfs files. `hg manifest` will show standins if present. They aren't,
70 into the lfs files. `hg manifest` will show standins if present. They aren't,
71 because largefiles merge doesn't merge content. If it did, selecting (n)ormal
71 because largefiles merge doesn't merge content. If it did, selecting (n)ormal
72 would convert to lfs on commit, if appropriate.
72 would convert to lfs on commit, if appropriate.
73
73
74 BUG: Largefiles isn't running the merge tool, like when two lfs files are
74 BUG: Largefiles isn't running the merge tool, like when two lfs files are
75 merged. This is probably by design, but it should probably at least prompt if
75 merged. This is probably by design, but it should probably at least prompt if
76 content should be taken from (l)ocal or (o)ther as well.
76 content should be taken from (l)ocal or (o)ther as well.
77
77
78 $ hg --config ui.interactive=True merge 6513aaab9ca0 <<EOF
78 $ hg --config ui.interactive=True merge 6513aaab9ca0 <<EOF
79 > n
79 > n
80 > n
80 > n
81 > EOF
81 > EOF
82 remote turned local normal file large.bin into a largefile
82 remote turned local normal file large.bin into a largefile
83 use (l)argefile or keep (n)ormal file? n
83 use (l)argefile or keep (n)ormal file? n
84 remote turned local normal file lfs.bin into a largefile
84 remote turned local normal file lfs.bin into a largefile
85 use (l)argefile or keep (n)ormal file? n
85 use (l)argefile or keep (n)ormal file? n
86 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
86 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
87 (branch merge, don't forget to commit)
87 (branch merge, don't forget to commit)
88 $ hg ci -m 'merge lfs with largefiles -> normal'
88 $ hg ci -m 'merge lfs with largefiles -> normal'
89 $ hg manifest
89 $ hg manifest
90 large.bin
90 large.bin
91 lfs.bin
91 lfs.bin
92 lfs.txt
92 lfs.txt
93 normal.txt
93 normal.txt
94
94
95 The merged lfs.bin resolved to lfs because the (n)ormal option was picked. The
95 The merged lfs.bin resolved to lfs because the (n)ormal option was picked. The
96 lfs.txt file is unchanged by the merge, because it was added before lfs was
96 lfs.txt file is unchanged by the merge, because it was added before lfs was
97 enabled, and the content didn't change.
97 enabled, and the content didn't change.
98 $ hg debugdata lfs.bin 0
98 $ hg debugdata lfs.bin 0
99 version https://git-lfs.github.com/spec/v1
99 version https://git-lfs.github.com/spec/v1
100 oid sha256:81c7492b2c05e130431f65a87651b54a30c5da72c99ce35a1e9b9872a807312b
100 oid sha256:81c7492b2c05e130431f65a87651b54a30c5da72c99ce35a1e9b9872a807312b
101 size 53
101 size 53
102 x-is-binary 0
102 x-is-binary 0
103 $ hg debugdata lfs.txt 0
103 $ hg debugdata lfs.txt 0
104 normal above lfs threshold 0000000000000000000000000
104 normal above lfs threshold 0000000000000000000000000
105
105
106 Another filelog entry is NOT made by the merge, so nothing is committed as lfs.
106 Another filelog entry is NOT made by the merge, so nothing is committed as lfs.
107 $ hg log -r . -T '{join(lfs_files, ", ")}\n'
107 $ hg log -r . -T '{join(lfs_files, ", ")}\n'
108
108
109
109
110 Replay the last merge, but pick (l)arge this time. The manifest will show any
110 Replay the last merge, but pick (l)arge this time. The manifest will show any
111 standins.
111 standins.
112
112
113 $ hg up -Cq e989d0fa3764
113 $ hg up -Cq e989d0fa3764
114
114
115 $ hg --config ui.interactive=True merge 6513aaab9ca0 <<EOF
115 $ hg --config ui.interactive=True merge 6513aaab9ca0 <<EOF
116 > l
116 > l
117 > l
117 > l
118 > EOF
118 > EOF
119 remote turned local normal file large.bin into a largefile
119 remote turned local normal file large.bin into a largefile
120 use (l)argefile or keep (n)ormal file? l
120 use (l)argefile or keep (n)ormal file? l
121 remote turned local normal file lfs.bin into a largefile
121 remote turned local normal file lfs.bin into a largefile
122 use (l)argefile or keep (n)ormal file? l
122 use (l)argefile or keep (n)ormal file? l
123 getting changed largefiles
123 getting changed largefiles
124 2 largefiles updated, 0 removed
124 2 largefiles updated, 0 removed
125 2 files updated, 0 files merged, 2 files removed, 0 files unresolved
125 2 files updated, 0 files merged, 2 files removed, 0 files unresolved
126 (branch merge, don't forget to commit)
126 (branch merge, don't forget to commit)
127 $ hg ci -m 'merge lfs with largefiles -> large'
127 $ hg ci -m 'merge lfs with largefiles -> large'
128 created new head
128 created new head
129 $ hg manifest
129 $ hg manifest
130 .hglf/large.bin
130 .hglf/large.bin
131 .hglf/lfs.bin
131 .hglf/lfs.bin
132 lfs.txt
132 lfs.txt
133 normal.txt
133 normal.txt
134
134
135 --------------------------------------------------------------------------------
135 --------------------------------------------------------------------------------
136 Merge lfs into largefiles branch
136 Merge lfs into largefiles branch
137
137
138 $ hg up -Cq 6513aaab9ca0
138 $ hg up -Cq 6513aaab9ca0
139 $ hg --config ui.interactive=True merge e989d0fa3764 <<EOF
139 $ hg --config ui.interactive=True merge e989d0fa3764 <<EOF
140 > n
140 > n
141 > n
141 > n
142 > EOF
142 > EOF
143 remote turned local largefile large.bin into a normal file
143 remote turned local largefile large.bin into a normal file
144 keep (l)argefile or use (n)ormal file? n
144 keep (l)argefile or use (n)ormal file? n
145 remote turned local largefile lfs.bin into a normal file
145 remote turned local largefile lfs.bin into a normal file
146 keep (l)argefile or use (n)ormal file? n
146 keep (l)argefile or use (n)ormal file? n
147 getting changed largefiles
147 getting changed largefiles
148 0 largefiles updated, 0 removed
148 0 largefiles updated, 0 removed
149 2 files updated, 0 files merged, 2 files removed, 0 files unresolved
149 2 files updated, 0 files merged, 2 files removed, 0 files unresolved
150 (branch merge, don't forget to commit)
150 (branch merge, don't forget to commit)
151 $ hg ci -m 'merge largefiles with lfs -> normal'
151 $ hg ci -m 'merge largefiles with lfs -> normal'
152 created new head
152 created new head
153 $ hg manifest
153 $ hg manifest
154 large.bin
154 large.bin
155 lfs.bin
155 lfs.bin
156 lfs.txt
156 lfs.txt
157 normal.txt
157 normal.txt
158
158
159 The merged lfs.bin got converted to lfs because the (n)ormal option was picked.
159 The merged lfs.bin got converted to lfs because the (n)ormal option was picked.
160 The lfs.txt file is unchanged by the merge, because it was added before lfs was
160 The lfs.txt file is unchanged by the merge, because it was added before lfs was
161 enabled.
161 enabled.
162 $ hg debugdata lfs.bin 0
162 $ hg debugdata lfs.bin 0
163 version https://git-lfs.github.com/spec/v1
163 version https://git-lfs.github.com/spec/v1
164 oid sha256:81c7492b2c05e130431f65a87651b54a30c5da72c99ce35a1e9b9872a807312b
164 oid sha256:81c7492b2c05e130431f65a87651b54a30c5da72c99ce35a1e9b9872a807312b
165 size 53
165 size 53
166 x-is-binary 0
166 x-is-binary 0
167 $ hg debugdata lfs.txt 0
167 $ hg debugdata lfs.txt 0
168 normal above lfs threshold 0000000000000000000000000
168 normal above lfs threshold 0000000000000000000000000
169
169
170 Another filelog entry is NOT made by the merge, so nothing is committed as lfs.
170 Another filelog entry is NOT made by the merge, so nothing is committed as lfs.
171 $ hg log -r . -T '{join(lfs_files, ", ")}\n'
171 $ hg log -r . -T '{join(lfs_files, ", ")}\n'
172
172
173
173
174 Replay the last merge, but pick (l)arge this time. The manifest will show the
174 Replay the last merge, but pick (l)arge this time. The manifest will show the
175 standins.
175 standins.
176
176
177 $ hg up -Cq 6513aaab9ca0
177 $ hg up -Cq 6513aaab9ca0
178
178
179 $ hg --config ui.interactive=True merge e989d0fa3764 <<EOF
179 $ hg --config ui.interactive=True merge e989d0fa3764 <<EOF
180 > l
180 > l
181 > l
181 > l
182 > EOF
182 > EOF
183 remote turned local largefile large.bin into a normal file
183 remote turned local largefile large.bin into a normal file
184 keep (l)argefile or use (n)ormal file? l
184 keep (l)argefile or use (n)ormal file? l
185 remote turned local largefile lfs.bin into a normal file
185 remote turned local largefile lfs.bin into a normal file
186 keep (l)argefile or use (n)ormal file? l
186 keep (l)argefile or use (n)ormal file? l
187 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
187 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
188 (branch merge, don't forget to commit)
188 (branch merge, don't forget to commit)
189 $ hg ci -m 'merge largefiles with lfs -> large'
189 $ hg ci -m 'merge largefiles with lfs -> large'
190 created new head
190 created new head
191 $ hg manifest
191 $ hg manifest
192 .hglf/large.bin
192 .hglf/large.bin
193 .hglf/lfs.bin
193 .hglf/lfs.bin
194 lfs.txt
194 lfs.txt
195 normal.txt
195 normal.txt
196
196
197 --------------------------------------------------------------------------------
197 --------------------------------------------------------------------------------
198
198
199 When both largefiles and lfs are configured to add by size, the tie goes to
199 When both largefiles and lfs are configured to add by size, the tie goes to
200 largefiles since it hooks cmdutil.add() and lfs hooks the filelog write in the
200 largefiles since it hooks cmdutil.add() and lfs hooks the filelog write in the
201 commit. By the time the commit occurs, the tracked file is smaller than the
201 commit. By the time the commit occurs, the tracked file is smaller than the
202 threshold (assuming it is > 41, so the standins don't become lfs objects).
202 threshold (assuming it is > 41, so the standins don't become lfs objects).
203
203
204 $ "$PYTHON" -c 'import sys ; sys.stdout.write("y\n" * 1048576)' > large_by_size.bin
204 $ "$PYTHON" -c 'import sys ; sys.stdout.write("y\n" * 1048576)' > large_by_size.bin
205 $ hg --config largefiles.minsize=1 ci -Am 'large by size'
205 $ hg --config largefiles.minsize=1 ci -Am 'large by size'
206 adding large_by_size.bin as a largefile
206 adding large_by_size.bin as a largefile
207 $ hg manifest
207 $ hg manifest
208 .hglf/large.bin
208 .hglf/large.bin
209 .hglf/large_by_size.bin
209 .hglf/large_by_size.bin
210 .hglf/lfs.bin
210 .hglf/lfs.bin
211 lfs.txt
211 lfs.txt
212 normal.txt
212 normal.txt
213
213
214 $ hg rm large_by_size.bin
214 $ hg rm large_by_size.bin
215 $ hg ci -m 'remove large_by_size.bin'
215 $ hg ci -m 'remove large_by_size.bin'
216
216
217 Largefiles doesn't do anything special with diff, so it falls back to diffing
217 Largefiles doesn't do anything special with diff, so it falls back to diffing
218 the standins. Extdiff also is standin based comparison. Diff and extdiff both
218 the standins. Extdiff also is standin based comparison. Diff and extdiff both
219 work on the original file for lfs objects.
219 work on the original file for lfs objects.
220
220
221 Largefile -> lfs transition
221 Largefile -> lfs transition
222 $ hg diff -r 1 -r 3
222 $ hg diff -r 1 -r 3
223 diff -r 6513aaab9ca0 -r dcc5ce63e252 .hglf/large.bin
223 diff -r 6513aaab9ca0 -r dcc5ce63e252 .hglf/large.bin
224 --- a/.hglf/large.bin Thu Jan 01 00:00:00 1970 +0000
224 --- a/.hglf/large.bin Thu Jan 01 00:00:00 1970 +0000
225 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
225 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
226 @@ -1,1 +0,0 @@
226 @@ -1,1 +0,0 @@
227 -cef9a458373df9b0743a0d3c14d0c66fb19b8629
227 -cef9a458373df9b0743a0d3c14d0c66fb19b8629
228 diff -r 6513aaab9ca0 -r dcc5ce63e252 .hglf/lfs.bin
228 diff -r 6513aaab9ca0 -r dcc5ce63e252 .hglf/lfs.bin
229 --- a/.hglf/lfs.bin Thu Jan 01 00:00:00 1970 +0000
229 --- a/.hglf/lfs.bin Thu Jan 01 00:00:00 1970 +0000
230 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
230 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
231 @@ -1,1 +0,0 @@
231 @@ -1,1 +0,0 @@
232 -557fb6309cef935e1ac2c8296508379e4b15a6e6
232 -557fb6309cef935e1ac2c8296508379e4b15a6e6
233 diff -r 6513aaab9ca0 -r dcc5ce63e252 large.bin
233 diff -r 6513aaab9ca0 -r dcc5ce63e252 large.bin
234 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
234 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
235 +++ b/large.bin Thu Jan 01 00:00:00 1970 +0000
235 +++ b/large.bin Thu Jan 01 00:00:00 1970 +0000
236 @@ -0,0 +1,1 @@
236 @@ -0,0 +1,1 @@
237 +below lfs threshold
237 +below lfs threshold
238 diff -r 6513aaab9ca0 -r dcc5ce63e252 lfs.bin
238 diff -r 6513aaab9ca0 -r dcc5ce63e252 lfs.bin
239 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
239 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
240 +++ b/lfs.bin Thu Jan 01 00:00:00 1970 +0000
240 +++ b/lfs.bin Thu Jan 01 00:00:00 1970 +0000
241 @@ -0,0 +1,1 @@
241 @@ -0,0 +1,1 @@
242 +lfs above the lfs threshold for length 0000000000000
242 +lfs above the lfs threshold for length 0000000000000
243
243
244 lfs -> largefiles transition
244 lfs -> largefiles transition
245 $ hg diff -r 2 -r 6
245 $ hg diff -r 2 -r 6
246 diff -r e989d0fa3764 -r 95e1e80325c8 .hglf/large.bin
246 diff -r e989d0fa3764 -r 95e1e80325c8 .hglf/large.bin
247 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
247 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
248 +++ b/.hglf/large.bin Thu Jan 01 00:00:00 1970 +0000
248 +++ b/.hglf/large.bin Thu Jan 01 00:00:00 1970 +0000
249 @@ -0,0 +1,1 @@
249 @@ -0,0 +1,1 @@
250 +cef9a458373df9b0743a0d3c14d0c66fb19b8629
250 +cef9a458373df9b0743a0d3c14d0c66fb19b8629
251 diff -r e989d0fa3764 -r 95e1e80325c8 .hglf/lfs.bin
251 diff -r e989d0fa3764 -r 95e1e80325c8 .hglf/lfs.bin
252 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
252 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
253 +++ b/.hglf/lfs.bin Thu Jan 01 00:00:00 1970 +0000
253 +++ b/.hglf/lfs.bin Thu Jan 01 00:00:00 1970 +0000
254 @@ -0,0 +1,1 @@
254 @@ -0,0 +1,1 @@
255 +557fb6309cef935e1ac2c8296508379e4b15a6e6
255 +557fb6309cef935e1ac2c8296508379e4b15a6e6
256 diff -r e989d0fa3764 -r 95e1e80325c8 large.bin
256 diff -r e989d0fa3764 -r 95e1e80325c8 large.bin
257 --- a/large.bin Thu Jan 01 00:00:00 1970 +0000
257 --- a/large.bin Thu Jan 01 00:00:00 1970 +0000
258 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
258 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
259 @@ -1,1 +0,0 @@
259 @@ -1,1 +0,0 @@
260 -below lfs threshold
260 -below lfs threshold
261 diff -r e989d0fa3764 -r 95e1e80325c8 lfs.bin
261 diff -r e989d0fa3764 -r 95e1e80325c8 lfs.bin
262 --- a/lfs.bin Thu Jan 01 00:00:00 1970 +0000
262 --- a/lfs.bin Thu Jan 01 00:00:00 1970 +0000
263 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
263 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
264 @@ -1,1 +0,0 @@
264 @@ -1,1 +0,0 @@
265 -lfs above the lfs threshold for length 0000000000000
265 -lfs above the lfs threshold for length 0000000000000
266
266
267 A largefiles repo can be converted to lfs. The lfconvert command uses the
267 A largefiles repo can be converted to lfs. The lfconvert command uses the
268 convert extension under the hood with --to-normal. So the --config based
268 convert extension under the hood with --to-normal. So the --config based
269 parameters are available, but not --authormap, --branchmap, etc.
269 parameters are available, but not --authormap, --branchmap, etc.
270
270
271 $ cd ..
271 $ cd ..
272 $ hg lfconvert --to-normal largefiles nolargefiles 2>&1
272 $ hg lfconvert --to-normal largefiles nolargefiles 2>&1
273 initializing destination nolargefiles
273 initializing destination nolargefiles
274 0 additional largefiles cached
274 0 additional largefiles cached
275 scanning source...
275 scanning source...
276 sorting...
276 sorting...
277 converting...
277 converting...
278 8 normal.txt
278 8 normal.txt
279 7 add largefiles
279 7 add largefiles
280 6 add with lfs extension
280 6 add with lfs extension
281 5 merge lfs with largefiles -> normal
281 5 merge lfs with largefiles -> normal
282 4 merge lfs with largefiles -> large
282 4 merge lfs with largefiles -> large
283 3 merge largefiles with lfs -> normal
283 3 merge largefiles with lfs -> normal
284 2 merge largefiles with lfs -> large
284 2 merge largefiles with lfs -> large
285 1 large by size
285 1 large by size
286 0 remove large_by_size.bin
286 0 remove large_by_size.bin
287 $ cd nolargefiles
287 $ cd nolargefiles
288
288
289 The requirement is added to the destination repo.
289 The requirement is added to the destination repo.
290
290
291 $ hg debugrequires
291 $ hg debugrequires | grep lfs
292 dotencode
293 dirstate-v2 (dirstate-v2 !)
294 fncache
295 generaldelta
296 lfs
292 lfs
297 persistent-nodemap (rust !)
298 revlog-compression-zstd (zstd !)
299 revlogv1
300 sparserevlog
301 store
302
293
303 $ hg log -r 'all()' -G -T '{rev} {join(lfs_files, ", ")} ({desc})\n'
294 $ hg log -r 'all()' -G -T '{rev} {join(lfs_files, ", ")} ({desc})\n'
304 o 8 large_by_size.bin (remove large_by_size.bin)
295 o 8 large_by_size.bin (remove large_by_size.bin)
305 |
296 |
306 o 7 large_by_size.bin (large by size)
297 o 7 large_by_size.bin (large by size)
307 |
298 |
308 o 6 (merge largefiles with lfs -> large)
299 o 6 (merge largefiles with lfs -> large)
309 |\
300 |\
310 +---o 5 (merge largefiles with lfs -> normal)
301 +---o 5 (merge largefiles with lfs -> normal)
311 | |/
302 | |/
312 +---o 4 lfs.bin (merge lfs with largefiles -> large)
303 +---o 4 lfs.bin (merge lfs with largefiles -> large)
313 | |/
304 | |/
314 +---o 3 (merge lfs with largefiles -> normal)
305 +---o 3 (merge lfs with largefiles -> normal)
315 | |/
306 | |/
316 | o 2 lfs.bin (add with lfs extension)
307 | o 2 lfs.bin (add with lfs extension)
317 | |
308 | |
318 o | 1 lfs.bin (add largefiles)
309 o | 1 lfs.bin (add largefiles)
319 |/
310 |/
320 o 0 lfs.txt (normal.txt)
311 o 0 lfs.txt (normal.txt)
321
312
322 $ hg debugdata lfs.bin 0
313 $ hg debugdata lfs.bin 0
323 version https://git-lfs.github.com/spec/v1
314 version https://git-lfs.github.com/spec/v1
324 oid sha256:2172a5bd492dd41ec533b9bb695f7691b6351719407ac797f0ccad5348c81e62
315 oid sha256:2172a5bd492dd41ec533b9bb695f7691b6351719407ac797f0ccad5348c81e62
325 size 53
316 size 53
326 x-is-binary 0
317 x-is-binary 0
327 $ hg debugdata lfs.bin 1
318 $ hg debugdata lfs.bin 1
328 version https://git-lfs.github.com/spec/v1
319 version https://git-lfs.github.com/spec/v1
329 oid sha256:81c7492b2c05e130431f65a87651b54a30c5da72c99ce35a1e9b9872a807312b
320 oid sha256:81c7492b2c05e130431f65a87651b54a30c5da72c99ce35a1e9b9872a807312b
330 size 53
321 size 53
331 x-is-binary 0
322 x-is-binary 0
332 $ hg debugdata lfs.bin 2
323 $ hg debugdata lfs.bin 2
333 version https://git-lfs.github.com/spec/v1
324 version https://git-lfs.github.com/spec/v1
334 oid sha256:2172a5bd492dd41ec533b9bb695f7691b6351719407ac797f0ccad5348c81e62
325 oid sha256:2172a5bd492dd41ec533b9bb695f7691b6351719407ac797f0ccad5348c81e62
335 size 53
326 size 53
336 x-is-binary 0
327 x-is-binary 0
337 $ hg debugdata lfs.bin 3
328 $ hg debugdata lfs.bin 3
338 abort: invalid revision identifier 3
329 abort: invalid revision identifier 3
339 [255]
330 [255]
340
331
341 No diffs when comparing merge and p1 that kept p1's changes. Diff of lfs to
332 No diffs when comparing merge and p1 that kept p1's changes. Diff of lfs to
342 largefiles no longer operates in standin files.
333 largefiles no longer operates in standin files.
343
334
344 This `head -n 20` looks dumb (since we expect no output), but if something
335 This `head -n 20` looks dumb (since we expect no output), but if something
345 breaks you can get 1048576 lines of +y in the output, which takes a looooooong
336 breaks you can get 1048576 lines of +y in the output, which takes a looooooong
346 time to print.
337 time to print.
347 $ hg diff -r 2:3 | head -n 20
338 $ hg diff -r 2:3 | head -n 20
348 $ hg diff -r 2:6 | head -n 20
339 $ hg diff -r 2:6 | head -n 20
349 diff -r e989d0fa3764 -r 752e3a0d8488 large.bin
340 diff -r e989d0fa3764 -r 752e3a0d8488 large.bin
350 --- a/large.bin Thu Jan 01 00:00:00 1970 +0000
341 --- a/large.bin Thu Jan 01 00:00:00 1970 +0000
351 +++ b/large.bin Thu Jan 01 00:00:00 1970 +0000
342 +++ b/large.bin Thu Jan 01 00:00:00 1970 +0000
352 @@ -1,1 +1,1 @@
343 @@ -1,1 +1,1 @@
353 -below lfs threshold
344 -below lfs threshold
354 +largefile
345 +largefile
355 diff -r e989d0fa3764 -r 752e3a0d8488 lfs.bin
346 diff -r e989d0fa3764 -r 752e3a0d8488 lfs.bin
356 --- a/lfs.bin Thu Jan 01 00:00:00 1970 +0000
347 --- a/lfs.bin Thu Jan 01 00:00:00 1970 +0000
357 +++ b/lfs.bin Thu Jan 01 00:00:00 1970 +0000
348 +++ b/lfs.bin Thu Jan 01 00:00:00 1970 +0000
358 @@ -1,1 +1,1 @@
349 @@ -1,1 +1,1 @@
359 -lfs above the lfs threshold for length 0000000000000
350 -lfs above the lfs threshold for length 0000000000000
360 +largefile above lfs threshold 0000000000000000000000
351 +largefile above lfs threshold 0000000000000000000000
General Comments 0
You need to be logged in to leave comments. Login now