Mercurial > hg
diff tests/test-narrow-widen-no-ellipsis.t @ 39466:83dd656586b1
tests: improve the widening testing in test-narrow-widen*
Before this patch, we are testing `hg tracked --addinclude` by adding a command
which is not introduced in the changesets till now.
If you closely look at the tests, wider/f was introduced on the server after the
narrow clone was done and extending the existing clone to include wider/f does
not make sense. We should test extending a file which exists.
Differential Revision: https://phab.mercurial-scm.org/D4452
author | Pulkit Goyal <pulkit@yandex-team.ru> |
---|---|
date | Tue, 04 Sep 2018 15:16:22 +0300 |
parents | 3d8b73c0fadf |
children | f1186c292d03 |
line wrap: on
line diff
--- a/tests/test-narrow-widen-no-ellipsis.t Tue Sep 04 19:26:50 2018 +0300 +++ b/tests/test-narrow-widen-no-ellipsis.t Tue Sep 04 15:16:22 2018 +0300 @@ -84,22 +84,25 @@ $ cd .. -Widen the narrow spec to see the wider file. This should not get the newly +Widen the narrow spec to see the widest file. This should not get the newly added upstream revisions. $ cd narrow - $ hg tracked --addinclude wider/f + $ hg tracked --addinclude widest/f comparing with ssh://user@dummy/master searching for changes no changes found adding changesets adding manifests adding file changes - added 0 changesets with 0 changes to 1 files + added 0 changesets with 1 changes to 2 files 3 local changesets published $ hg tracked I path:inside - I path:wider/f + I path:widest/f + + $ cat widest/f + widest Pull down the newly added upstream revision. @@ -109,18 +112,19 @@ adding changesets adding manifests adding file changes - added 5 changesets with 2 changes to 2 files + added 5 changesets with 4 changes to 2 files new changesets *:* (glob) (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 - $ cat wider/f - wider + + $ cat widest/f + widest v2 $ hg update -r 'desc("update inside")' - 1 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ cat wider/f - wider + 2 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cat widest/f + widest v3 $ cat inside/f inside v2 @@ -141,21 +145,21 @@ abort: newlines are not allowed in narrowspec paths [255] -widen the narrow spec to include the widest file +widen the narrow spec to include the wider file - $ hg tracked --addinclude widest + $ hg tracked --addinclude wider comparing with ssh://user@dummy/master searching for changes no changes found adding changesets adding manifests adding file changes - added 0 changesets with 4 changes to 3 files + added 0 changesets with 1 changes to 3 files 5 local changesets published $ hg tracked I path:inside - I path:wider/f - I path:widest + I path:wider + I path:widest/f $ hg update 'desc("add widest")' 2 files updated, 0 files merged, 1 files removed, 0 files unresolved $ cat widest/f