Mercurial > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
39465:4062bbb1d10f | 39466:83dd656586b1 |
---|---|
82 1: add widest | 82 1: add widest |
83 0: add inside | 83 0: add inside |
84 | 84 |
85 $ cd .. | 85 $ cd .. |
86 | 86 |
87 Widen the narrow spec to see the wider file. This should not get the newly | 87 Widen the narrow spec to see the widest file. This should not get the newly |
88 added upstream revisions. | 88 added upstream revisions. |
89 | 89 |
90 $ cd narrow | 90 $ cd narrow |
91 $ hg tracked --addinclude wider/f | 91 $ hg tracked --addinclude widest/f |
92 comparing with ssh://user@dummy/master | 92 comparing with ssh://user@dummy/master |
93 searching for changes | 93 searching for changes |
94 no changes found | 94 no changes found |
95 adding changesets | 95 adding changesets |
96 adding manifests | 96 adding manifests |
97 adding file changes | 97 adding file changes |
98 added 0 changesets with 0 changes to 1 files | 98 added 0 changesets with 1 changes to 2 files |
99 3 local changesets published | 99 3 local changesets published |
100 $ hg tracked | 100 $ hg tracked |
101 I path:inside | 101 I path:inside |
102 I path:wider/f | 102 I path:widest/f |
103 | |
104 $ cat widest/f | |
105 widest | |
103 | 106 |
104 Pull down the newly added upstream revision. | 107 Pull down the newly added upstream revision. |
105 | 108 |
106 $ hg pull | 109 $ hg pull |
107 pulling from ssh://user@dummy/master | 110 pulling from ssh://user@dummy/master |
108 searching for changes | 111 searching for changes |
109 adding changesets | 112 adding changesets |
110 adding manifests | 113 adding manifests |
111 adding file changes | 114 adding file changes |
112 added 5 changesets with 2 changes to 2 files | 115 added 5 changesets with 4 changes to 2 files |
113 new changesets *:* (glob) | 116 new changesets *:* (glob) |
114 (run 'hg update' to get a working copy) | 117 (run 'hg update' to get a working copy) |
115 $ hg update -r 'desc("add wider")' | 118 $ hg update -r 'desc("add wider")' |
116 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 119 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
117 $ cat wider/f | 120 |
118 wider | 121 $ cat widest/f |
122 widest v2 | |
119 | 123 |
120 $ hg update -r 'desc("update inside")' | 124 $ hg update -r 'desc("update inside")' |
121 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 125 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
122 $ cat wider/f | 126 $ cat widest/f |
123 wider | 127 widest v3 |
124 $ cat inside/f | 128 $ cat inside/f |
125 inside v2 | 129 inside v2 |
126 | 130 |
127 $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" | 131 $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" |
128 7: update widest v4 | 132 7: update widest v4 |
139 $ hg tracked --addinclude 'widest | 143 $ hg tracked --addinclude 'widest |
140 > ' | 144 > ' |
141 abort: newlines are not allowed in narrowspec paths | 145 abort: newlines are not allowed in narrowspec paths |
142 [255] | 146 [255] |
143 | 147 |
144 widen the narrow spec to include the widest file | 148 widen the narrow spec to include the wider file |
145 | 149 |
146 $ hg tracked --addinclude widest | 150 $ hg tracked --addinclude wider |
147 comparing with ssh://user@dummy/master | 151 comparing with ssh://user@dummy/master |
148 searching for changes | 152 searching for changes |
149 no changes found | 153 no changes found |
150 adding changesets | 154 adding changesets |
151 adding manifests | 155 adding manifests |
152 adding file changes | 156 adding file changes |
153 added 0 changesets with 4 changes to 3 files | 157 added 0 changesets with 1 changes to 3 files |
154 5 local changesets published | 158 5 local changesets published |
155 $ hg tracked | 159 $ hg tracked |
156 I path:inside | 160 I path:inside |
157 I path:wider/f | 161 I path:wider |
158 I path:widest | 162 I path:widest/f |
159 $ hg update 'desc("add widest")' | 163 $ hg update 'desc("add widest")' |
160 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | 164 2 files updated, 0 files merged, 1 files removed, 0 files unresolved |
161 $ cat widest/f | 165 $ cat widest/f |
162 widest | 166 widest |
163 $ hg update 'desc("add wider, update widest")' | 167 $ hg update 'desc("add wider, update widest")' |