--- a/tests/test-lfs-serve.t Fri Aug 31 19:58:41 2018 +0100
+++ b/tests/test-lfs-serve.t Tue Oct 16 08:16:11 2018 -0400
@@ -244,6 +244,30 @@
$TESTTMP/client3_pull/.hg/requires:lfs (lfsremote-on !)
$TESTTMP/server/.hg/requires:lfs (lfsremote-on !)
+Test that the commit/changegroup requirement check hook can be run multiple
+times.
+
+ $ hg clone -qr 0 http://localhost:$HGPORT $TESTTMP/cmdserve_client3
+
+ $ cd ../cmdserve_client3
+
+ >>> from __future__ import absolute_import
+ >>> from hgclient import check, readchannel, runcommand
+ >>> @check
+ ... def addrequirement(server):
+ ... readchannel(server)
+ ... # change the repo in a way that adds the lfs requirement
+ ... runcommand(server, ['pull', '-qu'])
+ ... # Now cause the requirement adding hook to fire again, without going
+ ... # through reposetup() again.
+ ... with open('file.txt', 'wb') as fp:
+ ... fp.write('data')
+ ... runcommand(server, ['ci', '-Aqm', 'non-lfs'])
+ *** runcommand pull -qu
+ *** runcommand ci -Aqm non-lfs
+
+ $ cd ../client
+
The difference here is the push failed above when the extension isn't
enabled on the server.
$ hg identify http://localhost:$HGPORT