--- a/tests/test-largefiles.t Tue Mar 18 14:29:33 2014 -0700
+++ b/tests/test-largefiles.t Mon Mar 31 10:12:07 2014 -0500
@@ -2287,4 +2287,30 @@
$ test -d clone-pull-dst
[1]
+#if serve
+
+Test largefiles specific peer setup, when largefiles is enabled
+locally (issue4109)
+
+ $ hg showconfig extensions | grep largefiles
+ extensions.largefiles=!
+ $ mkdir -p $TESTTMP/individualenabling/usercache
+
+ $ hg serve -R enabledlocally -d -p $HGPORT --pid-file hg.pid
+ $ cat hg.pid >> $DAEMON_PIDS
+
+ $ hg init pull-dst
+ $ cat > pull-dst/.hg/hgrc <<EOF
+ > [extensions]
+ > # enable locally
+ > largefiles=
+ > [largefiles]
+ > # ignore system cache to force largefiles specific wire proto access
+ > usercache=$TESTTMP/individualenabling/usercache
+ > EOF
+ $ hg -R pull-dst -q pull -u http://localhost:$HGPORT
+
+ $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
+#endif
+
$ cd ..