tests: add test for widening from an empty clone
authorMartin von Zweigbergk <martinvonz@google.com>
Wed, 17 Oct 2018 09:30:07 -0700
changeset 40343 a69d5823af6d
parent 40342 6f152067ba57
child 40344 2c5835b4246b
tests: add test for widening from an empty clone Narrow clones that track no paths currently don't even include the root manifest (which is the only manifest when using flat manifests). That means that when we widen from such a clone, we need to make sure that we send the root manifest (and other manifests if using tree manifests). That currently works because we always resend all manifest that match the new narrowspec. However, we're about to stop resending manifests that the client already has and there's a risk of this breaking then, so let's add a test. Differential Revision: https://phab.mercurial-scm.org/D5143
tests/test-narrow-widen-no-ellipsis.t
--- a/tests/test-narrow-widen-no-ellipsis.t	Wed Oct 17 11:43:39 2018 -0700
+++ b/tests/test-narrow-widen-no-ellipsis.t	Wed Oct 17 09:30:07 2018 -0700
@@ -30,17 +30,30 @@
 
 narrow clone the inside file
 
-  $ hg clone --narrow ssh://user@dummy/master narrow --include inside
+  $ hg clone --narrow ssh://user@dummy/master narrow
   requesting all changes
   adding changesets
   adding manifests
   adding file changes
-  added 3 changesets with 1 changes to 1 files
+  added 3 changesets with 0 changes to 0 files
   new changesets *:* (glob)
   updating to branch default
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ cd narrow
   $ hg tracked
+  $ hg files
+  [1]
+
+widen from an empty clone
+
+  $ hg tracked --addinclude inside
+  comparing with ssh://user@dummy/master
+  searching for changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 0 changesets with 1 changes to 1 files
+  $ hg tracked
   I path:inside
   $ ls
   inside