Mercurial > hg > mercurial-crew-with-dirclash
view tests/test-revert @ 2061:5987c1eac2ce
support nested repositories.
mercurial will not recurse into a subdirectory that contains a .hg
directory. it is treated as a separate repository.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Fri, 31 Mar 2006 17:00:09 -0800 |
parents | d436b21b20dc |
children | c9226bcc288d |
line wrap: on
line source
#!/bin/sh hg init echo 123 > a echo 123 > c echo 123 > e hg add a c e hg commit -m "first" -d "1000000 0" a c e echo 123 > b echo %% should show b unknown hg status echo 12 > c echo %% should show b unknown and c modified hg status hg add b echo %% should show b added and c modified hg status hg rm a echo %% should show a removed, b added and c modified hg status hg revert a echo %% should show b added, copy saved, and c modified hg status hg revert b echo %% should show b unknown, b.bak unknown, and c modified hg status hg revert --no-backup c echo %% should show unknown: b b.bak hg status echo %% should show a b b.bak c e ls echo %% should save backup to e.0 echo z > e hg revert --backup='%p.%R' echo %% should say no changes needed hg revert a echo %% should say file not managed echo q > q hg revert q echo %% should say file not found hg revert notfound true