D5143: tests: add test for widening from an empty clone
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Wed Oct 17 16:52:23 UTC 2018
martinvonz created this revision.
Herald added a reviewer: durin42.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
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.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D5143
AFFECTED FILES
tests/test-narrow-widen-no-ellipsis.t
CHANGE DETAILS
diff --git a/tests/test-narrow-widen-no-ellipsis.t b/tests/test-narrow-widen-no-ellipsis.t
--- a/tests/test-narrow-widen-no-ellipsis.t
+++ b/tests/test-narrow-widen-no-ellipsis.t
@@ -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
@@ -137,7 +150,6 @@
adding file changes
added 5 changesets with 4 changes to 2 files
new changesets *:* (glob)
- 3 local changesets published
(run 'hg update' to get a working copy)
$ hg update -r 'desc("add wider")'
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
To: martinvonz, durin42, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list