narrow: add test showing that local-to-local narrow clones don't work
It turns out they've never actually worked: prior to some recent
refactoring they just unintentionally followed the full-clone path,
which we unintentionally relied on in a test at Google.
Differential Revision: https://phab.mercurial-scm.org/D4640
--- a/tests/test-narrow-clone.t Wed Sep 19 17:34:36 2018 -0700
+++ b/tests/test-narrow-clone.t Mon Sep 17 20:43:40 2018 -0400
@@ -61,6 +61,17 @@
$ cd ..
+BUG: local-to-local narrow clones should work, but don't.
+
+ $ hg clone --narrow master narrow-via-localpeer --noupdate --include "dir/src/f10"
+ requesting all changes
+ abort: server doesn't support narrow clones
+ [255]
+ $ hg tracked -R narrow-via-localpeer
+ abort: repository narrow-via-localpeer not found!
+ [255]
+ $ rm -Rf narrow-via-localpeer
+
narrow clone with a newline should fail
$ hg clone --narrow ssh://user@dummy/master narrow_fail --noupdate --include 'dir/src/f10