##// END OF EJS Templates
tests: add more complete test for status changes on amend...
Yuya Nishihara -
r35014:b69c700b stable
parent child Browse files
Show More
@@ -235,3 +235,105 b' Amend a merge changeset'
235 |
235 |
236 o A
236 o A
237
237
238
239 More complete test for status changes (issue5732)
240 -------------------------------------------------
241
242 Generates history of files having 3 states, r0_r1_wc:
243
244 r0: ground (content/missing)
245 r1: old state to be amended (content/missing, where missing means removed)
246 wc: changes to be included in r1 (content/missing-tracked/untracked)
247
248 $ hg init $TESTTMP/wcstates
249 $ cd $TESTTMP/wcstates
250
251 $ $PYTHON $TESTDIR/generate-working-copy-states.py state 2 1
252 $ hg addremove -q --similarity 0
253 $ hg commit -m0
254
255 $ $PYTHON $TESTDIR/generate-working-copy-states.py state 2 2
256 $ hg addremove -q --similarity 0
257 $ hg commit -m1
258
259 $ $PYTHON $TESTDIR/generate-working-copy-states.py state 2 wc
260 $ hg addremove -q --similarity 0
261 $ hg forget *_*_*-untracked
262 $ rm *_*_missing-*
263
264 amend r1 to include wc changes
265
266 $ hg amend
267 saved backup bundle to * (glob) (obsstore-off !)
268
269 clean/modified/removed/added states of the amended revision
270
271 BROKEN: untracked files aren't removed
272 BROKEN: missing files are removed
273
274 $ hg status --all --change . 'glob:content1_*_content1-tracked'
275 C content1_content1_content1-tracked
276 C content1_content2_content1-tracked
277 C content1_missing_content1-tracked
278 $ hg status --all --change . 'glob:content1_*_content[23]-tracked'
279 M content1_content1_content3-tracked
280 M content1_content2_content2-tracked
281 M content1_content2_content3-tracked
282 M content1_missing_content3-tracked
283 $ hg status --all --change . 'glob:content1_*_missing-tracked'
284 M content1_content2_missing-tracked
285 R content1_missing_missing-tracked
286 C content1_content1_missing-tracked
287 $ hg status --all --change . 'glob:content1_*_*-untracked'
288 M content1_content1_content3-untracked (true !)
289 M content1_content2_content2-untracked (true !)
290 M content1_content2_content3-untracked (true !)
291 R content1_content1_content1-untracked (false !)
292 R content1_content1_content3-untracked (false !)
293 R content1_content1_missing-untracked
294 R content1_content2_content1-untracked (false !)
295 R content1_content2_content2-untracked (false !)
296 R content1_content2_content3-untracked (false !)
297 R content1_content2_missing-untracked
298 R content1_missing_content1-untracked
299 R content1_missing_content3-untracked
300 R content1_missing_missing-untracked
301 C content1_content1_content1-untracked (true !)
302 C content1_content2_content1-untracked (true !)
303 $ hg status --all --change . 'glob:missing_content2_*'
304 A missing_content2_content2-tracked
305 A missing_content2_content3-tracked
306 A missing_content2_missing-tracked (false !)
307 $ hg status --all --change . 'glob:missing_missing_*'
308 A missing_missing_content3-tracked
309
310 working directory should be all clean (with some missing/untracked files)
311
312 $ hg status --all 'glob:*_content?-tracked'
313 C content1_content1_content1-tracked
314 C content1_content1_content3-tracked
315 C content1_content2_content1-tracked
316 C content1_content2_content2-tracked
317 C content1_content2_content3-tracked
318 C content1_missing_content1-tracked
319 C content1_missing_content3-tracked
320 C missing_content2_content2-tracked
321 C missing_content2_content3-tracked
322 C missing_missing_content3-tracked
323 $ hg status --all 'glob:*_missing-tracked'
324 ! content1_content1_missing-tracked
325 ! content1_content2_missing-tracked
326 ! content1_missing_missing-tracked
327 ! missing_content2_missing-tracked
328 ! missing_missing_missing-tracked
329 $ hg status --all 'glob:*-untracked'
330 ? content1_content1_content1-untracked
331 ? content1_content1_content3-untracked
332 ? content1_content2_content1-untracked
333 ? content1_content2_content2-untracked
334 ? content1_content2_content3-untracked
335 ? content1_missing_content1-untracked
336 ? content1_missing_content3-untracked
337 ? missing_content2_content2-untracked
338 ? missing_content2_content3-untracked
339 ? missing_missing_content3-untracked
General Comments 0
You need to be logged in to leave comments. Login now