tests/test-lfs-serve.t
branchstable
changeset 40131 535fc8a22365
parent 38239 ead71b15efd5
child 40313 ef0baff11aea
equal deleted inserted replaced
39942:3e61146d7b24 40131:535fc8a22365
   218   $ hg -R $TESTTMP/client3_pull pull -q http://localhost:$HGPORT
   218   $ hg -R $TESTTMP/client3_pull pull -q http://localhost:$HGPORT
   219   $ grep 'lfs' $TESTTMP/client3_pull/.hg/requires $SERVER_REQUIRES || true
   219   $ grep 'lfs' $TESTTMP/client3_pull/.hg/requires $SERVER_REQUIRES || true
   220   $TESTTMP/client3_pull/.hg/requires:lfs (lfsremote-on !)
   220   $TESTTMP/client3_pull/.hg/requires:lfs (lfsremote-on !)
   221   $TESTTMP/server/.hg/requires:lfs (lfsremote-on !)
   221   $TESTTMP/server/.hg/requires:lfs (lfsremote-on !)
   222 
   222 
       
   223 Test that the commit/changegroup requirement check hook can be run multiple
       
   224 times.
       
   225 
       
   226   $ hg clone -qr 0 http://localhost:$HGPORT $TESTTMP/cmdserve_client3
       
   227 
       
   228   $ cd ../cmdserve_client3
       
   229 
       
   230   >>> from __future__ import absolute_import
       
   231   >>> from hgclient import check, readchannel, runcommand
       
   232   >>> @check
       
   233   ... def addrequirement(server):
       
   234   ...     readchannel(server)
       
   235   ...     # change the repo in a way that adds the lfs requirement
       
   236   ...     runcommand(server, ['pull', '-qu'])
       
   237   ...     # Now cause the requirement adding hook to fire again, without going
       
   238   ...     # through reposetup() again.
       
   239   ...     with open('file.txt', 'wb') as fp:
       
   240   ...         fp.write('data')
       
   241   ...     runcommand(server, ['ci', '-Aqm', 'non-lfs'])
       
   242   *** runcommand pull -qu
       
   243   *** runcommand ci -Aqm non-lfs
       
   244 
       
   245   $ cd ../client
       
   246 
   223 The difference here is the push failed above when the extension isn't
   247 The difference here is the push failed above when the extension isn't
   224 enabled on the server.
   248 enabled on the server.
   225   $ hg identify http://localhost:$HGPORT
   249   $ hg identify http://localhost:$HGPORT
   226   8374dc4052cb (lfsremote-on !)
   250   8374dc4052cb (lfsremote-on !)
   227   1477875038c6 (lfsremote-off !)
   251   1477875038c6 (lfsremote-off !)