diff --git a/tests/test-mq-qclone-http b/tests/test-mq-qclone-http
new file mode 100755
index 0000000000000000000000000000000000000000..b193a6e591319726e8ccd0b4322f9b4785f59390_dGVzdHMvdGVzdC1tcS1xY2xvbmUtaHR0cA==
--- /dev/null
+++ b/tests/test-mq-qclone-http
@@ -0,0 +1,39 @@
+#! /bin/sh
+
+echo "[extensions]" >> $HGRCPATH
+echo "mq=" >> $HGRCPATH
+
+mkdir webdir
+cd webdir
+
+hg init a
+hg --cwd a qinit -c
+echo a > a/a
+hg --cwd a ci -A -m a
+echo b > a/b
+hg --cwd a addremove
+hg --cwd a qnew -f b.patch
+hg --cwd a qcommit -m b.patch
+
+hg --cwd a log --template "{desc}\n"
+hg --cwd a/.hg/patches log --template "{desc}\n"
+
+root=`pwd`
+
+cd ..
+
+cat > collections.conf <<EOF
+[collections]
+$root=$root
+EOF
+
+hg serve -p $HGPORT -d --pid-file=hg.pid --webdir-conf collections.conf \
+    -A access-paths.log -E error-paths-1.log
+cat hg.pid >> $DAEMON_PIDS
+
+"$TESTDIR/get-with-headers.py" localhost:$HGPORT '/?style=raw'
+
+hg qclone http://localhost:$HGPORT/a b
+hg --cwd b log --template "{desc}\n"
+hg --cwd b qpush -a
+hg --cwd b log --template "{desc}\n"
diff --git a/tests/test-mq-qclone-http.out b/tests/test-mq-qclone-http.out
new file mode 100644
index 0000000000000000000000000000000000000000..b193a6e591319726e8ccd0b4322f9b4785f59390_dGVzdHMvdGVzdC1tcS1xY2xvbmUtaHR0cC5vdXQ=
--- /dev/null
+++ b/tests/test-mq-qclone-http.out
@@ -0,0 +1,28 @@
+adding a
+adding b
+[mq]: b.patch
+a
+b.patch
+200 Script output follows
+
+
+/a/
+/a/.hg/patches/
+
+requesting all changes
+adding changesets
+adding manifests
+adding file changes
+added 2 changesets with 2 changes to 2 files
+requesting all changes
+adding changesets
+adding manifests
+adding file changes
+added 1 changesets with 3 changes to 3 files
+3 files updated, 0 files merged, 0 files removed, 0 files unresolved
+1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+a
+applying b.patch
+Now at: b.patch
+imported patch b.patch
+a