Mercurial > hg
comparison tests/test-narrow-widen-non-ellipsis.t @ 39361:5ebfb7cc6f2c
tests: use {rev} instead of {node|short} and (glob) in narrow tests
I think we used {node|short} because they were first written for only
flat manifests and we didn't think to change the format when we
started testing tree manifests.
Differential Revision: https://phab.mercurial-scm.org/D4421
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Wed, 29 Aug 2018 16:57:18 -0700 |
parents | 57b2a02420cd |
children |
comparison
equal
deleted
inserted
replaced
39360:570fca90d556 | 39361:5ebfb7cc6f2c |
---|---|
70 $ hg commit -m 'add outside2' | 70 $ hg commit -m 'add outside2' |
71 | 71 |
72 $ echo 'widest v4' > widest/f | 72 $ echo 'widest v4' > widest/f |
73 $ hg commit -m 'update widest v4' | 73 $ hg commit -m 'update widest v4' |
74 | 74 |
75 $ hg log -T "{if(ellipsis, '...')}{node|short}: {desc}\n" | 75 $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" |
76 *: update widest v4 (glob) | 76 7: update widest v4 |
77 *: add outside2 (glob) | 77 6: add outside2 |
78 *: update inside (glob) | 78 5: update inside |
79 *: update widest v3 (glob) | 79 4: update widest v3 |
80 *: add wider, update widest (glob) | 80 3: add wider, update widest |
81 *: add outside (glob) | 81 2: add outside |
82 *: add widest (glob) | 82 1: add widest |
83 *: add inside (glob) | 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 wider file. This should not get the newly |
88 added upstream revisions. | 88 added upstream revisions. |
122 $ cat wider/f | 122 $ cat wider/f |
123 wider | 123 wider |
124 $ cat inside/f | 124 $ cat inside/f |
125 inside v2 | 125 inside v2 |
126 | 126 |
127 $ hg log -T "{if(ellipsis, '...')}{node|short}: {desc}\n" | 127 $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" |
128 *: update widest v4 (glob) | 128 7: update widest v4 |
129 *: add outside2 (glob) | 129 6: add outside2 |
130 *: update inside (glob) | 130 5: update inside |
131 *: update widest v3 (glob) | 131 4: update widest v3 |
132 *: add wider, update widest (glob) | 132 3: add wider, update widest |
133 *: add outside (glob) | 133 2: add outside |
134 *: add widest (glob) | 134 1: add widest |
135 *: add inside (glob) | 135 0: add inside |
136 | 136 |
137 Check that widening with a newline fails | 137 Check that widening with a newline fails |
138 | 138 |
139 $ hg tracked --addinclude 'widest | 139 $ hg tracked --addinclude 'widest |
140 > ' | 140 > ' |
173 $ hg update 'desc("update widest v4")' | 173 $ hg update 'desc("update widest v4")' |
174 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | 174 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
175 $ cat widest/f | 175 $ cat widest/f |
176 widest v4 | 176 widest v4 |
177 | 177 |
178 $ hg log -T "{if(ellipsis, '...')}{node|short}: {desc}\n" | 178 $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" |
179 *: update widest v4 (glob) | 179 7: update widest v4 |
180 *: add outside2 (glob) | 180 6: add outside2 |
181 *: update inside (glob) | 181 5: update inside |
182 *: update widest v3 (glob) | 182 4: update widest v3 |
183 *: add wider, update widest (glob) | 183 3: add wider, update widest |
184 *: add outside (glob) | 184 2: add outside |
185 *: add widest (glob) | 185 1: add widest |
186 *: add inside (glob) | 186 0: add inside |
187 | 187 |
188 separate suite of tests: files from 0-10 modified in changes 0-10. This allows | 188 separate suite of tests: files from 0-10 modified in changes 0-10. This allows |
189 more obvious precise tests tickling particular corner cases. | 189 more obvious precise tests tickling particular corner cases. |
190 | 190 |
191 $ cd .. | 191 $ cd .. |
196 > mkdir d$x | 196 > mkdir d$x |
197 > echo $x > d$x/f | 197 > echo $x > d$x/f |
198 > hg add d$x/f | 198 > hg add d$x/f |
199 > hg commit -m "add d$x/f" | 199 > hg commit -m "add d$x/f" |
200 > done | 200 > done |
201 $ hg log -T "{node|short}: {desc}\n" | 201 $ hg log -T "{rev}: {desc}\n" |
202 *: add d10/f (glob) | 202 10: add d10/f |
203 *: add d9/f (glob) | 203 9: add d9/f |
204 *: add d8/f (glob) | 204 8: add d8/f |
205 *: add d7/f (glob) | 205 7: add d7/f |
206 *: add d6/f (glob) | 206 6: add d6/f |
207 *: add d5/f (glob) | 207 5: add d5/f |
208 *: add d4/f (glob) | 208 4: add d4/f |
209 *: add d3/f (glob) | 209 3: add d3/f |
210 *: add d2/f (glob) | 210 2: add d2/f |
211 *: add d1/f (glob) | 211 1: add d1/f |
212 *: add d0/f (glob) | 212 0: add d0/f |
213 | 213 |
214 make narrow clone with every third node. | 214 make narrow clone with every third node. |
215 | 215 |
216 $ cd .. | 216 $ cd .. |
217 $ hg clone --narrow ssh://user@dummy/upstream narrow2 --include d0 --include d3 --include d6 --include d9 | 217 $ hg clone --narrow ssh://user@dummy/upstream narrow2 --include d0 --include d3 --include d6 --include d9 |
234 checking manifests | 234 checking manifests |
235 checking directory manifests (tree !) | 235 checking directory manifests (tree !) |
236 crosschecking files in changesets and manifests | 236 crosschecking files in changesets and manifests |
237 checking files | 237 checking files |
238 4 files, 11 changesets, 4 total revisions | 238 4 files, 11 changesets, 4 total revisions |
239 $ hg log -T "{if(ellipsis, '...')}{node|short}: {desc}\n" | 239 $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" |
240 *: add d10/f (glob) | 240 10: add d10/f |
241 *: add d9/f (glob) | 241 9: add d9/f |
242 *: add d8/f (glob) | 242 8: add d8/f |
243 *: add d7/f (glob) | 243 7: add d7/f |
244 *: add d6/f (glob) | 244 6: add d6/f |
245 *: add d5/f (glob) | 245 5: add d5/f |
246 *: add d4/f (glob) | 246 4: add d4/f |
247 *: add d3/f (glob) | 247 3: add d3/f |
248 *: add d2/f (glob) | 248 2: add d2/f |
249 *: add d1/f (glob) | 249 1: add d1/f |
250 *: add d0/f (glob) | 250 0: add d0/f |
251 $ hg tracked --addinclude d1 | 251 $ hg tracked --addinclude d1 |
252 comparing with ssh://user@dummy/upstream | 252 comparing with ssh://user@dummy/upstream |
253 searching for changes | 253 searching for changes |
254 no changes found | 254 no changes found |
255 adding changesets | 255 adding changesets |
261 I path:d0 | 261 I path:d0 |
262 I path:d1 | 262 I path:d1 |
263 I path:d3 | 263 I path:d3 |
264 I path:d6 | 264 I path:d6 |
265 I path:d9 | 265 I path:d9 |
266 $ hg log -T "{if(ellipsis, '...')}{node|short}: {desc}\n" | 266 $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" |
267 *: add d10/f (glob) | 267 10: add d10/f |
268 *: add d9/f (glob) | 268 9: add d9/f |
269 *: add d8/f (glob) | 269 8: add d8/f |
270 *: add d7/f (glob) | 270 7: add d7/f |
271 *: add d6/f (glob) | 271 6: add d6/f |
272 *: add d5/f (glob) | 272 5: add d5/f |
273 *: add d4/f (glob) | 273 4: add d4/f |
274 *: add d3/f (glob) | 274 3: add d3/f |
275 *: add d2/f (glob) | 275 2: add d2/f |
276 *: add d1/f (glob) | 276 1: add d1/f |
277 *: add d0/f (glob) | 277 0: add d0/f |
278 | 278 |
279 Verify shouldn't claim the repo is corrupt after a widen. | 279 Verify shouldn't claim the repo is corrupt after a widen. |
280 | 280 |
281 $ hg verify | 281 $ hg verify |
282 checking changesets | 282 checking changesets |
289 Widening preserves parent of local commit | 289 Widening preserves parent of local commit |
290 | 290 |
291 $ cd .. | 291 $ cd .. |
292 $ hg clone -q --narrow ssh://user@dummy/upstream narrow3 --include d2 -r 2 | 292 $ hg clone -q --narrow ssh://user@dummy/upstream narrow3 --include d2 -r 2 |
293 $ cd narrow3 | 293 $ cd narrow3 |
294 $ hg log -T "{if(ellipsis, '...')}{node|short}: {desc}\n" | 294 $ hg log -T "{if(ellipsis, '...')}{rev}: {desc}\n" |
295 *: add d2/f (glob) | 295 2: add d2/f |
296 *: add d1/f (glob) | 296 1: add d1/f |
297 *: add d0/f (glob) | 297 0: add d0/f |
298 $ hg pull -q -r 3 | 298 $ hg pull -q -r 3 |
299 $ hg co -q tip | 299 $ hg co -q tip |
300 $ hg pull -q -r 4 | 300 $ hg pull -q -r 4 |
301 $ echo local > d2/f | 301 $ echo local > d2/f |
302 $ hg ci -m local | 302 $ hg ci -m local |