Show More
@@ -237,7 +237,9 b' def reposetup(ui, repo):' | |||||
237 |
|
237 | |||
238 | if 'lfs' not in repo.requirements: |
|
238 | if 'lfs' not in repo.requirements: | |
239 | def checkrequireslfs(ui, repo, **kwargs): |
|
239 | def checkrequireslfs(ui, repo, **kwargs): | |
240 |
if 'lfs' |
|
240 | if 'lfs' in repo.requirements: | |
|
241 | return 0 | |||
|
242 | ||||
241 |
|
|
243 | last = kwargs.get(r'node_last') | |
242 |
|
|
244 | _bin = node.bin | |
243 |
|
|
245 | if last: |
@@ -244,6 +244,30 b" should have an 'lfs' requirement after i" | |||||
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 | |||
|
248 | times. | |||
|
249 | ||||
|
250 | $ hg clone -qr 0 http://localhost:$HGPORT $TESTTMP/cmdserve_client3 | |||
|
251 | ||||
|
252 | $ cd ../cmdserve_client3 | |||
|
253 | ||||
|
254 | >>> from __future__ import absolute_import | |||
|
255 | >>> from hgclient import check, readchannel, runcommand | |||
|
256 | >>> @check | |||
|
257 | ... def addrequirement(server): | |||
|
258 | ... readchannel(server) | |||
|
259 | ... # change the repo in a way that adds the lfs requirement | |||
|
260 | ... runcommand(server, ['pull', '-qu']) | |||
|
261 | ... # Now cause the requirement adding hook to fire again, without going | |||
|
262 | ... # through reposetup() again. | |||
|
263 | ... with open('file.txt', 'wb') as fp: | |||
|
264 | ... fp.write('data') | |||
|
265 | ... runcommand(server, ['ci', '-Aqm', 'non-lfs']) | |||
|
266 | *** runcommand pull -qu | |||
|
267 | *** runcommand ci -Aqm non-lfs | |||
|
268 | ||||
|
269 | $ cd ../client | |||
|
270 | ||||
247 | 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 | |
248 | enabled on the server. |
|
272 | enabled on the server. | |
249 | $ hg identify http://localhost:$HGPORT |
|
273 | $ hg identify http://localhost:$HGPORT |
General Comments 0
You need to be logged in to leave comments.
Login now