##// END OF EJS Templates
tests: remove -q from test-lfs-serve.t...
Gregory Szorc -
r41852:47c4ac50 default
parent child Browse files
Show More
@@ -1,671 +1,673
1 #testcases lfsremote-on lfsremote-off
1 #testcases lfsremote-on lfsremote-off
2 #require serve no-reposimplestore no-chg
2 #require serve no-reposimplestore no-chg
3
3
4 This test splits `hg serve` with and without using the extension into separate
4 This test splits `hg serve` with and without using the extension into separate
5 tests cases. The tests are broken down as follows, where "LFS"/"No-LFS"
5 tests cases. The tests are broken down as follows, where "LFS"/"No-LFS"
6 indicates whether or not there are commits that use an LFS file, and "D"/"E"
6 indicates whether or not there are commits that use an LFS file, and "D"/"E"
7 indicates whether or not the extension is loaded. The "X" cases are not tested
7 indicates whether or not the extension is loaded. The "X" cases are not tested
8 individually, because the lfs requirement causes the process to bail early if
8 individually, because the lfs requirement causes the process to bail early if
9 the extension is disabled.
9 the extension is disabled.
10
10
11 . Server
11 . Server
12 .
12 .
13 . No-LFS LFS
13 . No-LFS LFS
14 . +----------------------------+
14 . +----------------------------+
15 . | || D | E | D | E |
15 . | || D | E | D | E |
16 . |---++=======================|
16 . |---++=======================|
17 . C | D || N/A | #1 | X | #4 |
17 . C | D || N/A | #1 | X | #4 |
18 . l No +---++-----------------------|
18 . l No +---++-----------------------|
19 . i LFS | E || #2 | #2 | X | #5 |
19 . i LFS | E || #2 | #2 | X | #5 |
20 . e +---++-----------------------|
20 . e +---++-----------------------|
21 . n | D || X | X | X | X |
21 . n | D || X | X | X | X |
22 . t LFS |---++-----------------------|
22 . t LFS |---++-----------------------|
23 . | E || #3 | #3 | X | #6 |
23 . | E || #3 | #3 | X | #6 |
24 . |---++-----------------------+
24 . |---++-----------------------+
25
25
26 make command server magic visible
26 make command server magic visible
27
27
28 #if windows
28 #if windows
29 $ PYTHONPATH="$TESTDIR/../contrib;$PYTHONPATH"
29 $ PYTHONPATH="$TESTDIR/../contrib;$PYTHONPATH"
30 #else
30 #else
31 $ PYTHONPATH="$TESTDIR/../contrib:$PYTHONPATH"
31 $ PYTHONPATH="$TESTDIR/../contrib:$PYTHONPATH"
32 #endif
32 #endif
33 $ export PYTHONPATH
33 $ export PYTHONPATH
34
34
35 $ hg init server
35 $ hg init server
36 $ SERVER_REQUIRES="$TESTTMP/server/.hg/requires"
36 $ SERVER_REQUIRES="$TESTTMP/server/.hg/requires"
37
37
38 $ cat > $TESTTMP/debugprocessors.py <<EOF
38 $ cat > $TESTTMP/debugprocessors.py <<EOF
39 > from mercurial import (
39 > from mercurial import (
40 > cmdutil,
40 > cmdutil,
41 > commands,
41 > commands,
42 > pycompat,
42 > pycompat,
43 > registrar,
43 > registrar,
44 > )
44 > )
45 > cmdtable = {}
45 > cmdtable = {}
46 > command = registrar.command(cmdtable)
46 > command = registrar.command(cmdtable)
47 > @command(b'debugprocessors', [], b'FILE')
47 > @command(b'debugprocessors', [], b'FILE')
48 > def debugprocessors(ui, repo, file_=None, **opts):
48 > def debugprocessors(ui, repo, file_=None, **opts):
49 > opts = pycompat.byteskwargs(opts)
49 > opts = pycompat.byteskwargs(opts)
50 > opts[b'changelog'] = False
50 > opts[b'changelog'] = False
51 > opts[b'manifest'] = False
51 > opts[b'manifest'] = False
52 > opts[b'dir'] = False
52 > opts[b'dir'] = False
53 > rl = cmdutil.openrevlog(repo, b'debugprocessors', file_, opts)
53 > rl = cmdutil.openrevlog(repo, b'debugprocessors', file_, opts)
54 > for flag, proc in rl._flagprocessors.items():
54 > for flag, proc in rl._flagprocessors.items():
55 > ui.status(b"registered processor '%#x'\n" % (flag))
55 > ui.status(b"registered processor '%#x'\n" % (flag))
56 > EOF
56 > EOF
57
57
58 Skip the experimental.changegroup3=True config. Failure to agree on this comes
58 Skip the experimental.changegroup3=True config. Failure to agree on this comes
59 first, and causes a "ValueError: no common changegroup version" or "abort:
59 first, and causes a "ValueError: no common changegroup version" or "abort:
60 HTTP Error 500: Internal Server Error", if the extension is only loaded on one
60 HTTP Error 500: Internal Server Error", if the extension is only loaded on one
61 side. If that *is* enabled, the subsequent failure is "abort: missing processor
61 side. If that *is* enabled, the subsequent failure is "abort: missing processor
62 for flag '0x2000'!" if the extension is only loaded on one side (possibly also
62 for flag '0x2000'!" if the extension is only loaded on one side (possibly also
63 masked by the Internal Server Error message).
63 masked by the Internal Server Error message).
64 $ cat >> $HGRCPATH <<EOF
64 $ cat >> $HGRCPATH <<EOF
65 > [extensions]
65 > [extensions]
66 > debugprocessors = $TESTTMP/debugprocessors.py
66 > debugprocessors = $TESTTMP/debugprocessors.py
67 > [experimental]
67 > [experimental]
68 > lfs.disableusercache = True
68 > lfs.disableusercache = True
69 > [lfs]
69 > [lfs]
70 > threshold=10
70 > threshold=10
71 > [web]
71 > [web]
72 > allow_push=*
72 > allow_push=*
73 > push_ssl=False
73 > push_ssl=False
74 > EOF
74 > EOF
75
75
76 $ cp $HGRCPATH $HGRCPATH.orig
76 $ cp $HGRCPATH $HGRCPATH.orig
77
77
78 #if lfsremote-on
78 #if lfsremote-on
79 $ hg --config extensions.lfs= -R server \
79 $ hg --config extensions.lfs= -R server \
80 > serve -p $HGPORT -d --pid-file=hg.pid --errorlog=$TESTTMP/errors.log
80 > serve -p $HGPORT -d --pid-file=hg.pid --errorlog=$TESTTMP/errors.log
81 #else
81 #else
82 $ hg --config extensions.lfs=! -R server \
82 $ hg --config extensions.lfs=! -R server \
83 > serve -p $HGPORT -d --pid-file=hg.pid --errorlog=$TESTTMP/errors.log
83 > serve -p $HGPORT -d --pid-file=hg.pid --errorlog=$TESTTMP/errors.log
84 #endif
84 #endif
85
85
86 $ cat hg.pid >> $DAEMON_PIDS
86 $ cat hg.pid >> $DAEMON_PIDS
87 $ hg clone -q http://localhost:$HGPORT client
87 $ hg clone -q http://localhost:$HGPORT client
88 $ grep 'lfs' client/.hg/requires $SERVER_REQUIRES
88 $ grep 'lfs' client/.hg/requires $SERVER_REQUIRES
89 [1]
89 [1]
90
90
91 This trivial repo will force commandserver to load the extension, but not call
91 This trivial repo will force commandserver to load the extension, but not call
92 reposetup() on another repo actually being operated on. This gives coverage
92 reposetup() on another repo actually being operated on. This gives coverage
93 that wrapper functions are not assuming reposetup() was called.
93 that wrapper functions are not assuming reposetup() was called.
94
94
95 $ hg init $TESTTMP/cmdservelfs
95 $ hg init $TESTTMP/cmdservelfs
96 $ cat >> $TESTTMP/cmdservelfs/.hg/hgrc << EOF
96 $ cat >> $TESTTMP/cmdservelfs/.hg/hgrc << EOF
97 > [extensions]
97 > [extensions]
98 > lfs =
98 > lfs =
99 > EOF
99 > EOF
100
100
101 --------------------------------------------------------------------------------
101 --------------------------------------------------------------------------------
102 Case #1: client with non-lfs content and the extension disabled; server with
102 Case #1: client with non-lfs content and the extension disabled; server with
103 non-lfs content, and the extension enabled.
103 non-lfs content, and the extension enabled.
104
104
105 $ cd client
105 $ cd client
106 $ echo 'non-lfs' > nonlfs.txt
106 $ echo 'non-lfs' > nonlfs.txt
107 >>> from __future__ import absolute_import
107 >>> from __future__ import absolute_import
108 >>> from hgclient import check, readchannel, runcommand
108 >>> from hgclient import check, readchannel, runcommand
109 >>> @check
109 >>> @check
110 ... def diff(server):
110 ... def diff(server):
111 ... readchannel(server)
111 ... readchannel(server)
112 ... # run an arbitrary command in the repo with the extension loaded
112 ... # run an arbitrary command in the repo with the extension loaded
113 ... runcommand(server, [b'id', b'-R', b'../cmdservelfs'])
113 ... runcommand(server, [b'id', b'-R', b'../cmdservelfs'])
114 ... # now run a command in a repo without the extension to ensure that
114 ... # now run a command in a repo without the extension to ensure that
115 ... # files are added safely..
115 ... # files are added safely..
116 ... runcommand(server, [b'ci', b'-Aqm', b'non-lfs'])
116 ... runcommand(server, [b'ci', b'-Aqm', b'non-lfs'])
117 ... # .. and that scmutil.prefetchfiles() safely no-ops..
117 ... # .. and that scmutil.prefetchfiles() safely no-ops..
118 ... runcommand(server, [b'diff', b'-r', b'.~1'])
118 ... runcommand(server, [b'diff', b'-r', b'.~1'])
119 ... # .. and that debugupgraderepo safely no-ops.
119 ... # .. and that debugupgraderepo safely no-ops.
120 ... runcommand(server, [b'debugupgraderepo', b'-q', b'--run'])
120 ... runcommand(server, [b'debugupgraderepo', b'-q', b'--run'])
121 *** runcommand id -R ../cmdservelfs
121 *** runcommand id -R ../cmdservelfs
122 000000000000 tip
122 000000000000 tip
123 *** runcommand ci -Aqm non-lfs
123 *** runcommand ci -Aqm non-lfs
124 *** runcommand diff -r .~1
124 *** runcommand diff -r .~1
125 diff -r 000000000000 nonlfs.txt
125 diff -r 000000000000 nonlfs.txt
126 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
126 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
127 +++ b/nonlfs.txt Thu Jan 01 00:00:00 1970 +0000
127 +++ b/nonlfs.txt Thu Jan 01 00:00:00 1970 +0000
128 @@ -0,0 +1,1 @@
128 @@ -0,0 +1,1 @@
129 +non-lfs
129 +non-lfs
130 *** runcommand debugupgraderepo -q --run
130 *** runcommand debugupgraderepo -q --run
131 upgrade will perform the following actions:
131 upgrade will perform the following actions:
132
132
133 requirements
133 requirements
134 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
134 preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
135
135
136 beginning upgrade...
136 beginning upgrade...
137 repository locked and read-only
137 repository locked and read-only
138 creating temporary repository to stage migrated data: * (glob)
138 creating temporary repository to stage migrated data: * (glob)
139 (it is safe to interrupt this process any time before data migration completes)
139 (it is safe to interrupt this process any time before data migration completes)
140 migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog)
140 migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog)
141 migrating 324 bytes in store; 129 bytes tracked data
141 migrating 324 bytes in store; 129 bytes tracked data
142 migrating 1 filelogs containing 1 revisions (73 bytes in store; 8 bytes tracked data)
142 migrating 1 filelogs containing 1 revisions (73 bytes in store; 8 bytes tracked data)
143 finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes
143 finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes
144 migrating 1 manifests containing 1 revisions (117 bytes in store; 52 bytes tracked data)
144 migrating 1 manifests containing 1 revisions (117 bytes in store; 52 bytes tracked data)
145 finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes
145 finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes
146 migrating changelog containing 1 revisions (134 bytes in store; 69 bytes tracked data)
146 migrating changelog containing 1 revisions (134 bytes in store; 69 bytes tracked data)
147 finished migrating 1 changelog revisions; change in size: 0 bytes
147 finished migrating 1 changelog revisions; change in size: 0 bytes
148 finished migrating 3 total revisions; total change in store size: 0 bytes
148 finished migrating 3 total revisions; total change in store size: 0 bytes
149 copying phaseroots
149 copying phaseroots
150 data fully migrated to temporary repository
150 data fully migrated to temporary repository
151 marking source repository as being upgraded; clients will be unable to read from repository
151 marking source repository as being upgraded; clients will be unable to read from repository
152 starting in-place swap of repository data
152 starting in-place swap of repository data
153 replaced files will be backed up at * (glob)
153 replaced files will be backed up at * (glob)
154 replacing store...
154 replacing store...
155 store replacement complete; repository was inconsistent for *s (glob)
155 store replacement complete; repository was inconsistent for *s (glob)
156 finalizing requirements file and making repository readable again
156 finalizing requirements file and making repository readable again
157 removing temporary repository * (glob)
157 removing temporary repository * (glob)
158 copy of old repository backed up at * (glob)
158 copy of old repository backed up at * (glob)
159 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
159 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
160
160
161 $ grep 'lfs' .hg/requires $SERVER_REQUIRES
161 $ grep 'lfs' .hg/requires $SERVER_REQUIRES
162 [1]
162 [1]
163
163
164 #if lfsremote-on
164 #if lfsremote-on
165
165
166 $ hg push -q
166 $ hg push -q
167 $ grep 'lfs' .hg/requires $SERVER_REQUIRES
167 $ grep 'lfs' .hg/requires $SERVER_REQUIRES
168 [1]
168 [1]
169
169
170 $ hg clone -q http://localhost:$HGPORT $TESTTMP/client1_clone
170 $ hg clone -q http://localhost:$HGPORT $TESTTMP/client1_clone
171 $ grep 'lfs' $TESTTMP/client1_clone/.hg/requires $SERVER_REQUIRES
171 $ grep 'lfs' $TESTTMP/client1_clone/.hg/requires $SERVER_REQUIRES
172 [1]
172 [1]
173
173
174 $ hg init $TESTTMP/client1_pull
174 $ hg init $TESTTMP/client1_pull
175 $ hg -R $TESTTMP/client1_pull pull -q http://localhost:$HGPORT
175 $ hg -R $TESTTMP/client1_pull pull -q http://localhost:$HGPORT
176 $ grep 'lfs' $TESTTMP/client1_pull/.hg/requires $SERVER_REQUIRES
176 $ grep 'lfs' $TESTTMP/client1_pull/.hg/requires $SERVER_REQUIRES
177 [1]
177 [1]
178
178
179 $ hg identify http://localhost:$HGPORT
179 $ hg identify http://localhost:$HGPORT
180 d437e1d24fbd
180 d437e1d24fbd
181
181
182 #endif
182 #endif
183
183
184 --------------------------------------------------------------------------------
184 --------------------------------------------------------------------------------
185 Case #2: client with non-lfs content and the extension enabled; server with
185 Case #2: client with non-lfs content and the extension enabled; server with
186 non-lfs content, and the extension state controlled by #testcases.
186 non-lfs content, and the extension state controlled by #testcases.
187
187
188 $ cat >> $HGRCPATH <<EOF
188 $ cat >> $HGRCPATH <<EOF
189 > [extensions]
189 > [extensions]
190 > lfs =
190 > lfs =
191 > EOF
191 > EOF
192 $ echo 'non-lfs' > nonlfs2.txt
192 $ echo 'non-lfs' > nonlfs2.txt
193 $ hg ci -Aqm 'non-lfs file with lfs client'
193 $ hg ci -Aqm 'non-lfs file with lfs client'
194
194
195 Since no lfs content has been added yet, the push is allowed, even when the
195 Since no lfs content has been added yet, the push is allowed, even when the
196 extension is not enabled remotely.
196 extension is not enabled remotely.
197
197
198 $ hg push -q
198 $ hg push -q
199 $ grep 'lfs' .hg/requires $SERVER_REQUIRES
199 $ grep 'lfs' .hg/requires $SERVER_REQUIRES
200 [1]
200 [1]
201
201
202 $ hg clone -q http://localhost:$HGPORT $TESTTMP/client2_clone
202 $ hg clone -q http://localhost:$HGPORT $TESTTMP/client2_clone
203 $ grep 'lfs' $TESTTMP/client2_clone/.hg/requires $SERVER_REQUIRES
203 $ grep 'lfs' $TESTTMP/client2_clone/.hg/requires $SERVER_REQUIRES
204 [1]
204 [1]
205
205
206 $ hg init $TESTTMP/client2_pull
206 $ hg init $TESTTMP/client2_pull
207 $ hg -R $TESTTMP/client2_pull pull -q http://localhost:$HGPORT
207 $ hg -R $TESTTMP/client2_pull pull -q http://localhost:$HGPORT
208 $ grep 'lfs' $TESTTMP/client2_pull/.hg/requires $SERVER_REQUIRES
208 $ grep 'lfs' $TESTTMP/client2_pull/.hg/requires $SERVER_REQUIRES
209 [1]
209 [1]
210
210
211 $ hg identify http://localhost:$HGPORT
211 $ hg identify http://localhost:$HGPORT
212 1477875038c6
212 1477875038c6
213
213
214 --------------------------------------------------------------------------------
214 --------------------------------------------------------------------------------
215 Case #3: client with lfs content and the extension enabled; server with
215 Case #3: client with lfs content and the extension enabled; server with
216 non-lfs content, and the extension state controlled by #testcases. The server
216 non-lfs content, and the extension state controlled by #testcases. The server
217 should have an 'lfs' requirement after it picks up its first commit with a blob.
217 should have an 'lfs' requirement after it picks up its first commit with a blob.
218
218
219 $ echo 'this is a big lfs file' > lfs.bin
219 $ echo 'this is a big lfs file' > lfs.bin
220 $ hg ci -Aqm 'lfs'
220 $ hg ci -Aqm 'lfs'
221 $ grep 'lfs' .hg/requires $SERVER_REQUIRES
221 $ grep 'lfs' .hg/requires $SERVER_REQUIRES
222 .hg/requires:lfs
222 .hg/requires:lfs
223
223
224 #if lfsremote-off
224 #if lfsremote-off
225 $ hg push -q
225 $ hg push -q
226 abort: required features are not supported in the destination: lfs
226 abort: required features are not supported in the destination: lfs
227 (enable the lfs extension on the server)
227 (enable the lfs extension on the server)
228 [255]
228 [255]
229 #else
229 #else
230 $ hg push -q
230 $ hg push -q
231 #endif
231 #endif
232 $ grep 'lfs' .hg/requires $SERVER_REQUIRES
232 $ grep 'lfs' .hg/requires $SERVER_REQUIRES
233 .hg/requires:lfs
233 .hg/requires:lfs
234 $TESTTMP/server/.hg/requires:lfs (lfsremote-on !)
234 $TESTTMP/server/.hg/requires:lfs (lfsremote-on !)
235
235
236 $ hg clone -q http://localhost:$HGPORT $TESTTMP/client3_clone
236 $ hg clone -q http://localhost:$HGPORT $TESTTMP/client3_clone
237 $ grep 'lfs' $TESTTMP/client3_clone/.hg/requires $SERVER_REQUIRES || true
237 $ grep 'lfs' $TESTTMP/client3_clone/.hg/requires $SERVER_REQUIRES || true
238 $TESTTMP/client3_clone/.hg/requires:lfs (lfsremote-on !)
238 $TESTTMP/client3_clone/.hg/requires:lfs (lfsremote-on !)
239 $TESTTMP/server/.hg/requires:lfs (lfsremote-on !)
239 $TESTTMP/server/.hg/requires:lfs (lfsremote-on !)
240
240
241 $ hg init $TESTTMP/client3_pull
241 $ hg init $TESTTMP/client3_pull
242 $ hg -R $TESTTMP/client3_pull pull -q http://localhost:$HGPORT
242 $ hg -R $TESTTMP/client3_pull pull -q http://localhost:$HGPORT
243 $ grep 'lfs' $TESTTMP/client3_pull/.hg/requires $SERVER_REQUIRES || true
243 $ grep 'lfs' $TESTTMP/client3_pull/.hg/requires $SERVER_REQUIRES || true
244 $TESTTMP/client3_pull/.hg/requires:lfs (lfsremote-on !)
244 $TESTTMP/client3_pull/.hg/requires:lfs (lfsremote-on !)
245 $TESTTMP/server/.hg/requires:lfs (lfsremote-on !)
245 $TESTTMP/server/.hg/requires:lfs (lfsremote-on !)
246
246
247 Test that the commit/changegroup requirement check hook can be run multiple
247 Test that the commit/changegroup requirement check hook can be run multiple
248 times.
248 times.
249
249
250 $ hg clone -qr 0 http://localhost:$HGPORT $TESTTMP/cmdserve_client3
250 $ hg clone -qr 0 http://localhost:$HGPORT $TESTTMP/cmdserve_client3
251
251
252 $ cd ../cmdserve_client3
252 $ cd ../cmdserve_client3
253
253
254 >>> from __future__ import absolute_import
254 >>> from __future__ import absolute_import
255 >>> from hgclient import check, readchannel, runcommand
255 >>> from hgclient import check, readchannel, runcommand
256 >>> @check
256 >>> @check
257 ... def addrequirement(server):
257 ... def addrequirement(server):
258 ... readchannel(server)
258 ... readchannel(server)
259 ... # change the repo in a way that adds the lfs requirement
259 ... # change the repo in a way that adds the lfs requirement
260 ... runcommand(server, [b'pull', b'-qu'])
260 ... runcommand(server, [b'pull', b'-qu'])
261 ... # Now cause the requirement adding hook to fire again, without going
261 ... # Now cause the requirement adding hook to fire again, without going
262 ... # through reposetup() again.
262 ... # through reposetup() again.
263 ... with open('file.txt', 'wb') as fp:
263 ... with open('file.txt', 'wb') as fp:
264 ... fp.write(b'data')
264 ... fp.write(b'data')
265 ... runcommand(server, [b'ci', b'-Aqm', b'non-lfs'])
265 ... runcommand(server, [b'ci', b'-Aqm', b'non-lfs'])
266 *** runcommand pull -qu
266 *** runcommand pull -qu
267 *** runcommand ci -Aqm non-lfs
267 *** runcommand ci -Aqm non-lfs
268
268
269 $ cd ../client
269 $ cd ../client
270
270
271 The difference here is the push failed above when the extension isn't
271 The difference here is the push failed above when the extension isn't
272 enabled on the server.
272 enabled on the server.
273 $ hg identify http://localhost:$HGPORT
273 $ hg identify http://localhost:$HGPORT
274 8374dc4052cb (lfsremote-on !)
274 8374dc4052cb (lfsremote-on !)
275 1477875038c6 (lfsremote-off !)
275 1477875038c6 (lfsremote-off !)
276
276
277 Don't bother testing the lfsremote-off cases- the server won't be able
277 Don't bother testing the lfsremote-off cases- the server won't be able
278 to launch if there's lfs content and the extension is disabled.
278 to launch if there's lfs content and the extension is disabled.
279
279
280 #if lfsremote-on
280 #if lfsremote-on
281
281
282 --------------------------------------------------------------------------------
282 --------------------------------------------------------------------------------
283 Case #4: client with non-lfs content and the extension disabled; server with
283 Case #4: client with non-lfs content and the extension disabled; server with
284 lfs content, and the extension enabled.
284 lfs content, and the extension enabled.
285
285
286 $ cat >> $HGRCPATH <<EOF
286 $ cat >> $HGRCPATH <<EOF
287 > [extensions]
287 > [extensions]
288 > lfs = !
288 > lfs = !
289 > EOF
289 > EOF
290
290
291 $ hg init $TESTTMP/client4
291 $ hg init $TESTTMP/client4
292 $ cd $TESTTMP/client4
292 $ cd $TESTTMP/client4
293 $ cat >> .hg/hgrc <<EOF
293 $ cat >> .hg/hgrc <<EOF
294 > [paths]
294 > [paths]
295 > default = http://localhost:$HGPORT
295 > default = http://localhost:$HGPORT
296 > EOF
296 > EOF
297 $ echo 'non-lfs' > nonlfs2.txt
297 $ echo 'non-lfs' > nonlfs2.txt
298 $ hg ci -Aqm 'non-lfs'
298 $ hg ci -Aqm 'non-lfs'
299 $ grep 'lfs' .hg/requires $SERVER_REQUIRES
299 $ grep 'lfs' .hg/requires $SERVER_REQUIRES
300 $TESTTMP/server/.hg/requires:lfs
300 $TESTTMP/server/.hg/requires:lfs
301
301
302 $ hg push -q --force
302 $ hg push -q --force
303 warning: repository is unrelated
303 warning: repository is unrelated
304 $ grep 'lfs' .hg/requires $SERVER_REQUIRES
304 $ grep 'lfs' .hg/requires $SERVER_REQUIRES
305 $TESTTMP/server/.hg/requires:lfs
305 $TESTTMP/server/.hg/requires:lfs
306
306
307 $ hg clone http://localhost:$HGPORT $TESTTMP/client4_clone
307 $ hg clone http://localhost:$HGPORT $TESTTMP/client4_clone
308 (remote is using large file support (lfs), but it is explicitly disabled in the local configuration)
308 (remote is using large file support (lfs), but it is explicitly disabled in the local configuration)
309 abort: repository requires features unknown to this Mercurial: lfs!
309 abort: repository requires features unknown to this Mercurial: lfs!
310 (see https://mercurial-scm.org/wiki/MissingRequirement for more information)
310 (see https://mercurial-scm.org/wiki/MissingRequirement for more information)
311 [255]
311 [255]
312 $ grep 'lfs' $TESTTMP/client4_clone/.hg/requires $SERVER_REQUIRES
312 $ grep 'lfs' $TESTTMP/client4_clone/.hg/requires $SERVER_REQUIRES
313 grep: $TESTTMP/client4_clone/.hg/requires: $ENOENT$
313 grep: $TESTTMP/client4_clone/.hg/requires: $ENOENT$
314 $TESTTMP/server/.hg/requires:lfs
314 $TESTTMP/server/.hg/requires:lfs
315 [2]
315 [2]
316
316
317 TODO: fail more gracefully.
317 TODO: fail more gracefully.
318
318
319 $ hg init $TESTTMP/client4_pull
319 $ hg init $TESTTMP/client4_pull
320 $ hg -R $TESTTMP/client4_pull pull -q http://localhost:$HGPORT
320 $ hg -R $TESTTMP/client4_pull pull http://localhost:$HGPORT
321 pulling from http://localhost:$HGPORT/
322 requesting all changes
321 abort: HTTP Error 500: Internal Server Error
323 abort: HTTP Error 500: Internal Server Error
322 [255]
324 [255]
323 $ grep 'lfs' $TESTTMP/client4_pull/.hg/requires $SERVER_REQUIRES
325 $ grep 'lfs' $TESTTMP/client4_pull/.hg/requires $SERVER_REQUIRES
324 $TESTTMP/server/.hg/requires:lfs
326 $TESTTMP/server/.hg/requires:lfs
325
327
326 $ hg identify http://localhost:$HGPORT
328 $ hg identify http://localhost:$HGPORT
327 03b080fa9d93
329 03b080fa9d93
328
330
329 --------------------------------------------------------------------------------
331 --------------------------------------------------------------------------------
330 Case #5: client with non-lfs content and the extension enabled; server with
332 Case #5: client with non-lfs content and the extension enabled; server with
331 lfs content, and the extension enabled.
333 lfs content, and the extension enabled.
332
334
333 $ cat >> $HGRCPATH <<EOF
335 $ cat >> $HGRCPATH <<EOF
334 > [extensions]
336 > [extensions]
335 > lfs =
337 > lfs =
336 > EOF
338 > EOF
337 $ echo 'non-lfs' > nonlfs3.txt
339 $ echo 'non-lfs' > nonlfs3.txt
338 $ hg ci -Aqm 'non-lfs file with lfs client'
340 $ hg ci -Aqm 'non-lfs file with lfs client'
339
341
340 $ hg push -q
342 $ hg push -q
341 $ grep 'lfs' .hg/requires $SERVER_REQUIRES
343 $ grep 'lfs' .hg/requires $SERVER_REQUIRES
342 $TESTTMP/server/.hg/requires:lfs
344 $TESTTMP/server/.hg/requires:lfs
343
345
344 $ hg clone -q http://localhost:$HGPORT $TESTTMP/client5_clone
346 $ hg clone -q http://localhost:$HGPORT $TESTTMP/client5_clone
345 $ grep 'lfs' $TESTTMP/client5_clone/.hg/requires $SERVER_REQUIRES
347 $ grep 'lfs' $TESTTMP/client5_clone/.hg/requires $SERVER_REQUIRES
346 $TESTTMP/client5_clone/.hg/requires:lfs
348 $TESTTMP/client5_clone/.hg/requires:lfs
347 $TESTTMP/server/.hg/requires:lfs
349 $TESTTMP/server/.hg/requires:lfs
348
350
349 $ hg init $TESTTMP/client5_pull
351 $ hg init $TESTTMP/client5_pull
350 $ hg -R $TESTTMP/client5_pull pull -q http://localhost:$HGPORT
352 $ hg -R $TESTTMP/client5_pull pull -q http://localhost:$HGPORT
351 $ grep 'lfs' $TESTTMP/client5_pull/.hg/requires $SERVER_REQUIRES
353 $ grep 'lfs' $TESTTMP/client5_pull/.hg/requires $SERVER_REQUIRES
352 $TESTTMP/client5_pull/.hg/requires:lfs
354 $TESTTMP/client5_pull/.hg/requires:lfs
353 $TESTTMP/server/.hg/requires:lfs
355 $TESTTMP/server/.hg/requires:lfs
354
356
355 $ hg identify http://localhost:$HGPORT
357 $ hg identify http://localhost:$HGPORT
356 c729025cc5e3
358 c729025cc5e3
357
359
358 $ mv $HGRCPATH $HGRCPATH.tmp
360 $ mv $HGRCPATH $HGRCPATH.tmp
359 $ cp $HGRCPATH.orig $HGRCPATH
361 $ cp $HGRCPATH.orig $HGRCPATH
360
362
361 >>> from __future__ import absolute_import
363 >>> from __future__ import absolute_import
362 >>> from hgclient import bprint, check, readchannel, runcommand, stdout
364 >>> from hgclient import bprint, check, readchannel, runcommand, stdout
363 >>> @check
365 >>> @check
364 ... def checkflags(server):
366 ... def checkflags(server):
365 ... readchannel(server)
367 ... readchannel(server)
366 ... bprint(b'')
368 ... bprint(b'')
367 ... bprint(b'# LFS required- both lfs and non-lfs revlogs have 0x2000 flag')
369 ... bprint(b'# LFS required- both lfs and non-lfs revlogs have 0x2000 flag')
368 ... stdout.flush()
370 ... stdout.flush()
369 ... runcommand(server, [b'debugprocessors', b'lfs.bin', b'-R',
371 ... runcommand(server, [b'debugprocessors', b'lfs.bin', b'-R',
370 ... b'../server'])
372 ... b'../server'])
371 ... runcommand(server, [b'debugprocessors', b'nonlfs2.txt', b'-R',
373 ... runcommand(server, [b'debugprocessors', b'nonlfs2.txt', b'-R',
372 ... b'../server'])
374 ... b'../server'])
373 ... runcommand(server, [b'config', b'extensions', b'--cwd',
375 ... runcommand(server, [b'config', b'extensions', b'--cwd',
374 ... b'../server'])
376 ... b'../server'])
375 ...
377 ...
376 ... bprint(b"\n# LFS not enabled- revlogs don't have 0x2000 flag")
378 ... bprint(b"\n# LFS not enabled- revlogs don't have 0x2000 flag")
377 ... stdout.flush()
379 ... stdout.flush()
378 ... runcommand(server, [b'debugprocessors', b'nonlfs3.txt'])
380 ... runcommand(server, [b'debugprocessors', b'nonlfs3.txt'])
379 ... runcommand(server, [b'config', b'extensions'])
381 ... runcommand(server, [b'config', b'extensions'])
380
382
381 # LFS required- both lfs and non-lfs revlogs have 0x2000 flag
383 # LFS required- both lfs and non-lfs revlogs have 0x2000 flag
382 *** runcommand debugprocessors lfs.bin -R ../server
384 *** runcommand debugprocessors lfs.bin -R ../server
383 registered processor '0x8000'
385 registered processor '0x8000'
384 registered processor '0x2000'
386 registered processor '0x2000'
385 *** runcommand debugprocessors nonlfs2.txt -R ../server
387 *** runcommand debugprocessors nonlfs2.txt -R ../server
386 registered processor '0x8000'
388 registered processor '0x8000'
387 registered processor '0x2000'
389 registered processor '0x2000'
388 *** runcommand config extensions --cwd ../server
390 *** runcommand config extensions --cwd ../server
389 extensions.debugprocessors=$TESTTMP/debugprocessors.py
391 extensions.debugprocessors=$TESTTMP/debugprocessors.py
390 extensions.lfs=
392 extensions.lfs=
391
393
392 # LFS not enabled- revlogs don't have 0x2000 flag
394 # LFS not enabled- revlogs don't have 0x2000 flag
393 *** runcommand debugprocessors nonlfs3.txt
395 *** runcommand debugprocessors nonlfs3.txt
394 registered processor '0x8000'
396 registered processor '0x8000'
395 *** runcommand config extensions
397 *** runcommand config extensions
396 extensions.debugprocessors=$TESTTMP/debugprocessors.py
398 extensions.debugprocessors=$TESTTMP/debugprocessors.py
397
399
398 $ rm $HGRCPATH
400 $ rm $HGRCPATH
399 $ mv $HGRCPATH.tmp $HGRCPATH
401 $ mv $HGRCPATH.tmp $HGRCPATH
400
402
401 $ hg clone $TESTTMP/client $TESTTMP/nonlfs -qr 0 --config extensions.lfs=
403 $ hg clone $TESTTMP/client $TESTTMP/nonlfs -qr 0 --config extensions.lfs=
402 $ cat >> $TESTTMP/nonlfs/.hg/hgrc <<EOF
404 $ cat >> $TESTTMP/nonlfs/.hg/hgrc <<EOF
403 > [extensions]
405 > [extensions]
404 > lfs = !
406 > lfs = !
405 > EOF
407 > EOF
406
408
407 >>> from __future__ import absolute_import, print_function
409 >>> from __future__ import absolute_import, print_function
408 >>> from hgclient import bprint, check, readchannel, runcommand, stdout
410 >>> from hgclient import bprint, check, readchannel, runcommand, stdout
409 >>> @check
411 >>> @check
410 ... def checkflags2(server):
412 ... def checkflags2(server):
411 ... readchannel(server)
413 ... readchannel(server)
412 ... bprint(b'')
414 ... bprint(b'')
413 ... bprint(b'# LFS enabled- both lfs and non-lfs revlogs have 0x2000 flag')
415 ... bprint(b'# LFS enabled- both lfs and non-lfs revlogs have 0x2000 flag')
414 ... stdout.flush()
416 ... stdout.flush()
415 ... runcommand(server, [b'debugprocessors', b'lfs.bin', b'-R',
417 ... runcommand(server, [b'debugprocessors', b'lfs.bin', b'-R',
416 ... b'../server'])
418 ... b'../server'])
417 ... runcommand(server, [b'debugprocessors', b'nonlfs2.txt', b'-R',
419 ... runcommand(server, [b'debugprocessors', b'nonlfs2.txt', b'-R',
418 ... b'../server'])
420 ... b'../server'])
419 ... runcommand(server, [b'config', b'extensions', b'--cwd',
421 ... runcommand(server, [b'config', b'extensions', b'--cwd',
420 ... b'../server'])
422 ... b'../server'])
421 ...
423 ...
422 ... bprint(b'\n# LFS enabled without requirement- revlogs have 0x2000 flag')
424 ... bprint(b'\n# LFS enabled without requirement- revlogs have 0x2000 flag')
423 ... stdout.flush()
425 ... stdout.flush()
424 ... runcommand(server, [b'debugprocessors', b'nonlfs3.txt'])
426 ... runcommand(server, [b'debugprocessors', b'nonlfs3.txt'])
425 ... runcommand(server, [b'config', b'extensions'])
427 ... runcommand(server, [b'config', b'extensions'])
426 ...
428 ...
427 ... bprint(b"\n# LFS disabled locally- revlogs don't have 0x2000 flag")
429 ... bprint(b"\n# LFS disabled locally- revlogs don't have 0x2000 flag")
428 ... stdout.flush()
430 ... stdout.flush()
429 ... runcommand(server, [b'debugprocessors', b'nonlfs.txt', b'-R',
431 ... runcommand(server, [b'debugprocessors', b'nonlfs.txt', b'-R',
430 ... b'../nonlfs'])
432 ... b'../nonlfs'])
431 ... runcommand(server, [b'config', b'extensions', b'--cwd',
433 ... runcommand(server, [b'config', b'extensions', b'--cwd',
432 ... b'../nonlfs'])
434 ... b'../nonlfs'])
433
435
434 # LFS enabled- both lfs and non-lfs revlogs have 0x2000 flag
436 # LFS enabled- both lfs and non-lfs revlogs have 0x2000 flag
435 *** runcommand debugprocessors lfs.bin -R ../server
437 *** runcommand debugprocessors lfs.bin -R ../server
436 registered processor '0x8000'
438 registered processor '0x8000'
437 registered processor '0x2000'
439 registered processor '0x2000'
438 *** runcommand debugprocessors nonlfs2.txt -R ../server
440 *** runcommand debugprocessors nonlfs2.txt -R ../server
439 registered processor '0x8000'
441 registered processor '0x8000'
440 registered processor '0x2000'
442 registered processor '0x2000'
441 *** runcommand config extensions --cwd ../server
443 *** runcommand config extensions --cwd ../server
442 extensions.debugprocessors=$TESTTMP/debugprocessors.py
444 extensions.debugprocessors=$TESTTMP/debugprocessors.py
443 extensions.lfs=
445 extensions.lfs=
444
446
445 # LFS enabled without requirement- revlogs have 0x2000 flag
447 # LFS enabled without requirement- revlogs have 0x2000 flag
446 *** runcommand debugprocessors nonlfs3.txt
448 *** runcommand debugprocessors nonlfs3.txt
447 registered processor '0x8000'
449 registered processor '0x8000'
448 registered processor '0x2000'
450 registered processor '0x2000'
449 *** runcommand config extensions
451 *** runcommand config extensions
450 extensions.debugprocessors=$TESTTMP/debugprocessors.py
452 extensions.debugprocessors=$TESTTMP/debugprocessors.py
451 extensions.lfs=
453 extensions.lfs=
452
454
453 # LFS disabled locally- revlogs don't have 0x2000 flag
455 # LFS disabled locally- revlogs don't have 0x2000 flag
454 *** runcommand debugprocessors nonlfs.txt -R ../nonlfs
456 *** runcommand debugprocessors nonlfs.txt -R ../nonlfs
455 registered processor '0x8000'
457 registered processor '0x8000'
456 *** runcommand config extensions --cwd ../nonlfs
458 *** runcommand config extensions --cwd ../nonlfs
457 extensions.debugprocessors=$TESTTMP/debugprocessors.py
459 extensions.debugprocessors=$TESTTMP/debugprocessors.py
458 extensions.lfs=!
460 extensions.lfs=!
459
461
460 --------------------------------------------------------------------------------
462 --------------------------------------------------------------------------------
461 Case #6: client with lfs content and the extension enabled; server with
463 Case #6: client with lfs content and the extension enabled; server with
462 lfs content, and the extension enabled.
464 lfs content, and the extension enabled.
463
465
464 $ echo 'this is another lfs file' > lfs2.txt
466 $ echo 'this is another lfs file' > lfs2.txt
465 $ hg ci -Aqm 'lfs file with lfs client'
467 $ hg ci -Aqm 'lfs file with lfs client'
466
468
467 $ hg --config paths.default= push -v http://localhost:$HGPORT
469 $ hg --config paths.default= push -v http://localhost:$HGPORT
468 pushing to http://localhost:$HGPORT/
470 pushing to http://localhost:$HGPORT/
469 lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
471 lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
470 searching for changes
472 searching for changes
471 remote has heads on branch 'default' that are not known locally: 8374dc4052cb
473 remote has heads on branch 'default' that are not known locally: 8374dc4052cb
472 lfs: uploading a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de (25 bytes)
474 lfs: uploading a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de (25 bytes)
473 lfs: processed: a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de
475 lfs: processed: a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de
474 lfs: uploaded 1 files (25 bytes)
476 lfs: uploaded 1 files (25 bytes)
475 1 changesets found
477 1 changesets found
476 uncompressed size of bundle content:
478 uncompressed size of bundle content:
477 206 (changelog)
479 206 (changelog)
478 172 (manifests)
480 172 (manifests)
479 275 lfs2.txt
481 275 lfs2.txt
480 remote: adding changesets
482 remote: adding changesets
481 remote: adding manifests
483 remote: adding manifests
482 remote: adding file changes
484 remote: adding file changes
483 remote: added 1 changesets with 1 changes to 1 files
485 remote: added 1 changesets with 1 changes to 1 files
484 $ grep 'lfs' .hg/requires $SERVER_REQUIRES
486 $ grep 'lfs' .hg/requires $SERVER_REQUIRES
485 .hg/requires:lfs
487 .hg/requires:lfs
486 $TESTTMP/server/.hg/requires:lfs
488 $TESTTMP/server/.hg/requires:lfs
487
489
488 $ hg clone -q http://localhost:$HGPORT $TESTTMP/client6_clone
490 $ hg clone -q http://localhost:$HGPORT $TESTTMP/client6_clone
489 $ grep 'lfs' $TESTTMP/client6_clone/.hg/requires $SERVER_REQUIRES
491 $ grep 'lfs' $TESTTMP/client6_clone/.hg/requires $SERVER_REQUIRES
490 $TESTTMP/client6_clone/.hg/requires:lfs
492 $TESTTMP/client6_clone/.hg/requires:lfs
491 $TESTTMP/server/.hg/requires:lfs
493 $TESTTMP/server/.hg/requires:lfs
492
494
493 $ hg init $TESTTMP/client6_pull
495 $ hg init $TESTTMP/client6_pull
494 $ hg -R $TESTTMP/client6_pull pull -u -v http://localhost:$HGPORT
496 $ hg -R $TESTTMP/client6_pull pull -u -v http://localhost:$HGPORT
495 pulling from http://localhost:$HGPORT/
497 pulling from http://localhost:$HGPORT/
496 requesting all changes
498 requesting all changes
497 adding changesets
499 adding changesets
498 adding manifests
500 adding manifests
499 adding file changes
501 adding file changes
500 added 6 changesets with 5 changes to 5 files (+1 heads)
502 added 6 changesets with 5 changes to 5 files (+1 heads)
501 calling hook pretxnchangegroup.lfs: hgext.lfs.checkrequireslfs
503 calling hook pretxnchangegroup.lfs: hgext.lfs.checkrequireslfs
502 new changesets d437e1d24fbd:d3b84d50eacb
504 new changesets d437e1d24fbd:d3b84d50eacb
503 resolving manifests
505 resolving manifests
504 lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
506 lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
505 lfs: downloading a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de (25 bytes)
507 lfs: downloading a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de (25 bytes)
506 lfs: processed: a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de
508 lfs: processed: a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de
507 lfs: downloaded 1 files (25 bytes)
509 lfs: downloaded 1 files (25 bytes)
508 getting lfs2.txt
510 getting lfs2.txt
509 lfs: found a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de in the local lfs store
511 lfs: found a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de in the local lfs store
510 getting nonlfs2.txt
512 getting nonlfs2.txt
511 getting nonlfs3.txt
513 getting nonlfs3.txt
512 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
514 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
513 updated to "d3b84d50eacb: lfs file with lfs client"
515 updated to "d3b84d50eacb: lfs file with lfs client"
514 1 other heads for branch "default"
516 1 other heads for branch "default"
515 (sent 3 HTTP requests and * bytes; received * bytes in responses) (glob)
517 (sent 3 HTTP requests and * bytes; received * bytes in responses) (glob)
516 $ grep 'lfs' $TESTTMP/client6_pull/.hg/requires $SERVER_REQUIRES
518 $ grep 'lfs' $TESTTMP/client6_pull/.hg/requires $SERVER_REQUIRES
517 $TESTTMP/client6_pull/.hg/requires:lfs
519 $TESTTMP/client6_pull/.hg/requires:lfs
518 $TESTTMP/server/.hg/requires:lfs
520 $TESTTMP/server/.hg/requires:lfs
519
521
520 $ hg identify http://localhost:$HGPORT
522 $ hg identify http://localhost:$HGPORT
521 d3b84d50eacb
523 d3b84d50eacb
522
524
523 --------------------------------------------------------------------------------
525 --------------------------------------------------------------------------------
524 Misc: process dies early if a requirement exists and the extension is disabled
526 Misc: process dies early if a requirement exists and the extension is disabled
525
527
526 $ hg --config extensions.lfs=! summary
528 $ hg --config extensions.lfs=! summary
527 abort: repository requires features unknown to this Mercurial: lfs!
529 abort: repository requires features unknown to this Mercurial: lfs!
528 (see https://mercurial-scm.org/wiki/MissingRequirement for more information)
530 (see https://mercurial-scm.org/wiki/MissingRequirement for more information)
529 [255]
531 [255]
530
532
531 $ echo 'this is an lfs file' > $TESTTMP/client6_clone/lfspair1.bin
533 $ echo 'this is an lfs file' > $TESTTMP/client6_clone/lfspair1.bin
532 $ echo 'this is an lfs file too' > $TESTTMP/client6_clone/lfspair2.bin
534 $ echo 'this is an lfs file too' > $TESTTMP/client6_clone/lfspair2.bin
533 $ hg -R $TESTTMP/client6_clone ci -Aqm 'add lfs pair'
535 $ hg -R $TESTTMP/client6_clone ci -Aqm 'add lfs pair'
534 $ hg -R $TESTTMP/client6_clone push -q
536 $ hg -R $TESTTMP/client6_clone push -q
535
537
536 $ hg clone -qU http://localhost:$HGPORT $TESTTMP/bulkfetch
538 $ hg clone -qU http://localhost:$HGPORT $TESTTMP/bulkfetch
537
539
538 Export will prefetch all needed files across all needed revisions
540 Export will prefetch all needed files across all needed revisions
539
541
540 $ hg -R $TESTTMP/bulkfetch -v export -r 0:tip -o all.export
542 $ hg -R $TESTTMP/bulkfetch -v export -r 0:tip -o all.export
541 lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
543 lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
542 exporting patches:
544 exporting patches:
543 lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
545 lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
544 lfs: need to transfer 4 objects (92 bytes)
546 lfs: need to transfer 4 objects (92 bytes)
545 lfs: downloading a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de (25 bytes)
547 lfs: downloading a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de (25 bytes)
546 lfs: processed: a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de
548 lfs: processed: a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de
547 lfs: downloading bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc (23 bytes)
549 lfs: downloading bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc (23 bytes)
548 lfs: processed: bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc
550 lfs: processed: bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc
549 lfs: downloading cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 (20 bytes)
551 lfs: downloading cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 (20 bytes)
550 lfs: processed: cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782
552 lfs: processed: cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782
551 lfs: downloading d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e (24 bytes)
553 lfs: downloading d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e (24 bytes)
552 lfs: processed: d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e
554 lfs: processed: d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e
553 lfs: downloaded 4 files (92 bytes)
555 lfs: downloaded 4 files (92 bytes)
554 all.export
556 all.export
555 lfs: found bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc in the local lfs store
557 lfs: found bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc in the local lfs store
556 lfs: found a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de in the local lfs store
558 lfs: found a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de in the local lfs store
557 lfs: found cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 in the local lfs store
559 lfs: found cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 in the local lfs store
558 lfs: found d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e in the local lfs store
560 lfs: found d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e in the local lfs store
559
561
560 Export with selected files is used with `extdiff --patch`
562 Export with selected files is used with `extdiff --patch`
561
563
562 $ rm -r $TESTTMP/bulkfetch/.hg/store/lfs
564 $ rm -r $TESTTMP/bulkfetch/.hg/store/lfs
563 $ hg --config extensions.extdiff= \
565 $ hg --config extensions.extdiff= \
564 > -R $TESTTMP/bulkfetch -v extdiff -r 2:tip --patch $TESTTMP/bulkfetch/lfs.bin
566 > -R $TESTTMP/bulkfetch -v extdiff -r 2:tip --patch $TESTTMP/bulkfetch/lfs.bin
565 lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
567 lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
566 lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
568 lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
567 lfs: downloading bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc (23 bytes)
569 lfs: downloading bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc (23 bytes)
568 lfs: processed: bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc
570 lfs: processed: bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc
569 lfs: downloaded 1 files (23 bytes)
571 lfs: downloaded 1 files (23 bytes)
570 */hg-8374dc4052cb.patch (glob)
572 */hg-8374dc4052cb.patch (glob)
571 lfs: found bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc in the local lfs store
573 lfs: found bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc in the local lfs store
572 */hg-9640b57e77b1.patch (glob)
574 */hg-9640b57e77b1.patch (glob)
573 --- */hg-8374dc4052cb.patch * (glob)
575 --- */hg-8374dc4052cb.patch * (glob)
574 +++ */hg-9640b57e77b1.patch * (glob)
576 +++ */hg-9640b57e77b1.patch * (glob)
575 @@ -2,12 +2,7 @@
577 @@ -2,12 +2,7 @@
576 # User test
578 # User test
577 # Date 0 0
579 # Date 0 0
578 # Thu Jan 01 00:00:00 1970 +0000
580 # Thu Jan 01 00:00:00 1970 +0000
579 -# Node ID 8374dc4052cbd388e79d9dc4ddb29784097aa354
581 -# Node ID 8374dc4052cbd388e79d9dc4ddb29784097aa354
580 -# Parent 1477875038c60152e391238920a16381c627b487
582 -# Parent 1477875038c60152e391238920a16381c627b487
581 -lfs
583 -lfs
582 +# Node ID 9640b57e77b14c3a0144fb4478b6cc13e13ea0d1
584 +# Node ID 9640b57e77b14c3a0144fb4478b6cc13e13ea0d1
583 +# Parent d3b84d50eacbd56638e11abce6b8616aaba54420
585 +# Parent d3b84d50eacbd56638e11abce6b8616aaba54420
584 +add lfs pair
586 +add lfs pair
585
587
586 -diff -r 1477875038c6 -r 8374dc4052cb lfs.bin
588 -diff -r 1477875038c6 -r 8374dc4052cb lfs.bin
587 ---- /dev/null Thu Jan 01 00:00:00 1970 +0000
589 ---- /dev/null Thu Jan 01 00:00:00 1970 +0000
588 -+++ b/lfs.bin Thu Jan 01 00:00:00 1970 +0000
590 -+++ b/lfs.bin Thu Jan 01 00:00:00 1970 +0000
589 -@@ -0,0 +1,1 @@
591 -@@ -0,0 +1,1 @@
590 -+this is a big lfs file
592 -+this is a big lfs file
591 cleaning up temp directory
593 cleaning up temp directory
592 [1]
594 [1]
593
595
594 Diff will prefetch files
596 Diff will prefetch files
595
597
596 $ rm -r $TESTTMP/bulkfetch/.hg/store/lfs
598 $ rm -r $TESTTMP/bulkfetch/.hg/store/lfs
597 $ hg -R $TESTTMP/bulkfetch -v diff -r 2:tip
599 $ hg -R $TESTTMP/bulkfetch -v diff -r 2:tip
598 lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
600 lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
599 lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
601 lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
600 lfs: need to transfer 4 objects (92 bytes)
602 lfs: need to transfer 4 objects (92 bytes)
601 lfs: downloading a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de (25 bytes)
603 lfs: downloading a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de (25 bytes)
602 lfs: processed: a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de
604 lfs: processed: a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de
603 lfs: downloading bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc (23 bytes)
605 lfs: downloading bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc (23 bytes)
604 lfs: processed: bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc
606 lfs: processed: bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc
605 lfs: downloading cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 (20 bytes)
607 lfs: downloading cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 (20 bytes)
606 lfs: processed: cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782
608 lfs: processed: cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782
607 lfs: downloading d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e (24 bytes)
609 lfs: downloading d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e (24 bytes)
608 lfs: processed: d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e
610 lfs: processed: d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e
609 lfs: downloaded 4 files (92 bytes)
611 lfs: downloaded 4 files (92 bytes)
610 lfs: found bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc in the local lfs store
612 lfs: found bed80f00180ac404b843628ab56a1c1984d6145c391cd1628a7dd7d2598d71fc in the local lfs store
611 lfs: found a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de in the local lfs store
613 lfs: found a82f1c5cea0d40e3bb3a849686bb4e6ae47ca27e614de55c1ed0325698ef68de in the local lfs store
612 lfs: found cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 in the local lfs store
614 lfs: found cf1b2787b74e66547d931b6ebe28ff63303e803cb2baa14a8f57c4383d875782 in the local lfs store
613 lfs: found d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e in the local lfs store
615 lfs: found d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e in the local lfs store
614 diff -r 8374dc4052cb -r 9640b57e77b1 lfs.bin
616 diff -r 8374dc4052cb -r 9640b57e77b1 lfs.bin
615 --- a/lfs.bin Thu Jan 01 00:00:00 1970 +0000
617 --- a/lfs.bin Thu Jan 01 00:00:00 1970 +0000
616 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
618 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
617 @@ -1,1 +0,0 @@
619 @@ -1,1 +0,0 @@
618 -this is a big lfs file
620 -this is a big lfs file
619 diff -r 8374dc4052cb -r 9640b57e77b1 lfs2.txt
621 diff -r 8374dc4052cb -r 9640b57e77b1 lfs2.txt
620 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
622 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
621 +++ b/lfs2.txt Thu Jan 01 00:00:00 1970 +0000
623 +++ b/lfs2.txt Thu Jan 01 00:00:00 1970 +0000
622 @@ -0,0 +1,1 @@
624 @@ -0,0 +1,1 @@
623 +this is another lfs file
625 +this is another lfs file
624 diff -r 8374dc4052cb -r 9640b57e77b1 lfspair1.bin
626 diff -r 8374dc4052cb -r 9640b57e77b1 lfspair1.bin
625 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
627 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
626 +++ b/lfspair1.bin Thu Jan 01 00:00:00 1970 +0000
628 +++ b/lfspair1.bin Thu Jan 01 00:00:00 1970 +0000
627 @@ -0,0 +1,1 @@
629 @@ -0,0 +1,1 @@
628 +this is an lfs file
630 +this is an lfs file
629 diff -r 8374dc4052cb -r 9640b57e77b1 lfspair2.bin
631 diff -r 8374dc4052cb -r 9640b57e77b1 lfspair2.bin
630 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
632 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
631 +++ b/lfspair2.bin Thu Jan 01 00:00:00 1970 +0000
633 +++ b/lfspair2.bin Thu Jan 01 00:00:00 1970 +0000
632 @@ -0,0 +1,1 @@
634 @@ -0,0 +1,1 @@
633 +this is an lfs file too
635 +this is an lfs file too
634 diff -r 8374dc4052cb -r 9640b57e77b1 nonlfs.txt
636 diff -r 8374dc4052cb -r 9640b57e77b1 nonlfs.txt
635 --- a/nonlfs.txt Thu Jan 01 00:00:00 1970 +0000
637 --- a/nonlfs.txt Thu Jan 01 00:00:00 1970 +0000
636 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
638 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
637 @@ -1,1 +0,0 @@
639 @@ -1,1 +0,0 @@
638 -non-lfs
640 -non-lfs
639 diff -r 8374dc4052cb -r 9640b57e77b1 nonlfs3.txt
641 diff -r 8374dc4052cb -r 9640b57e77b1 nonlfs3.txt
640 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
642 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
641 +++ b/nonlfs3.txt Thu Jan 01 00:00:00 1970 +0000
643 +++ b/nonlfs3.txt Thu Jan 01 00:00:00 1970 +0000
642 @@ -0,0 +1,1 @@
644 @@ -0,0 +1,1 @@
643 +non-lfs
645 +non-lfs
644
646
645 Only the files required by diff are prefetched
647 Only the files required by diff are prefetched
646
648
647 $ rm -r $TESTTMP/bulkfetch/.hg/store/lfs
649 $ rm -r $TESTTMP/bulkfetch/.hg/store/lfs
648 $ hg -R $TESTTMP/bulkfetch -v diff -r 2:tip $TESTTMP/bulkfetch/lfspair2.bin
650 $ hg -R $TESTTMP/bulkfetch -v diff -r 2:tip $TESTTMP/bulkfetch/lfspair2.bin
649 lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
651 lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
650 lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
652 lfs: assuming remote store: http://localhost:$HGPORT/.git/info/lfs
651 lfs: downloading d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e (24 bytes)
653 lfs: downloading d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e (24 bytes)
652 lfs: processed: d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e
654 lfs: processed: d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e
653 lfs: downloaded 1 files (24 bytes)
655 lfs: downloaded 1 files (24 bytes)
654 lfs: found d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e in the local lfs store
656 lfs: found d96eda2c74b56e95cfb5ffb66b6503e198cc6fc4a09dc877de925feebc65786e in the local lfs store
655 diff -r 8374dc4052cb -r 9640b57e77b1 lfspair2.bin
657 diff -r 8374dc4052cb -r 9640b57e77b1 lfspair2.bin
656 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
658 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
657 +++ b/lfspair2.bin Thu Jan 01 00:00:00 1970 +0000
659 +++ b/lfspair2.bin Thu Jan 01 00:00:00 1970 +0000
658 @@ -0,0 +1,1 @@
660 @@ -0,0 +1,1 @@
659 +this is an lfs file too
661 +this is an lfs file too
660
662
661 #endif
663 #endif
662
664
663 $ "$PYTHON" $TESTDIR/killdaemons.py $DAEMON_PIDS
665 $ "$PYTHON" $TESTDIR/killdaemons.py $DAEMON_PIDS
664
666
665 #if lfsremote-on
667 #if lfsremote-on
666 $ cat $TESTTMP/errors.log | grep '^[A-Z]'
668 $ cat $TESTTMP/errors.log | grep '^[A-Z]'
667 Traceback (most recent call last):
669 Traceback (most recent call last):
668 ValueError: no common changegroup version
670 ValueError: no common changegroup version
669 #else
671 #else
670 $ cat $TESTTMP/errors.log
672 $ cat $TESTTMP/errors.log
671 #endif
673 #endif
General Comments 0
You need to be logged in to leave comments. Login now