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