comparison tests/test-strip.t @ 27177:e76b27a642ca

strip: add a --keep test related to removing files from dirstate When strip builds the list of changedfiles to pass into dirstate.rebuild, it adds files blindly, including those that have been removed. This tests ensures that rebuild can handle this case.
author Christian Delahousse <cdelahousse@fb.com>
date Mon, 30 Nov 2015 11:23:15 -0800
parents cf9ed6d32ccb
children 72072cfc7e91 e417e4512b0f
comparison
equal deleted inserted replaced
27176:54ace3372f84 27177:e76b27a642ca
550 $ hg commit -mc 550 $ hg commit -mc
551 $ hg status 551 $ hg status
552 $ echo b > b 552 $ echo b > b
553 $ echo d > d 553 $ echo d > d
554 $ hg strip --keep tip 554 $ hg strip --keep tip
555 saved backup bundle to $TESTTMP/test/.hg/strip-backup/57e364c8a475-4cfed93c-backup.hg (glob) 555 saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob)
556 $ hg status 556 $ hg status
557 M b 557 M b
558 ! bar 558 ! bar
559 ? c 559 ? c
560 ? d 560 ? d
561
562 ... after updating the dirstate
563 $ hg add c
564 $ hg commit -mc
565 $ hg rm c
566 $ hg commit -mc
567 $ hg strip --keep '.^' -q
561 $ cd .. 568 $ cd ..
562 569
563 stripping many nodes on a complex graph (issue3299) 570 stripping many nodes on a complex graph (issue3299)
564 571
565 $ hg init issue3299 572 $ hg init issue3299