test-revert
43 lines
| 875 B
| text/plain
|
TextLexer
/ tests / test-revert
Benoit Boissinot
|
r1447 | #!/bin/sh | ||
hg init | ||||
echo 123 > a | ||||
echo 123 > c | ||||
Vadim Gelfer
|
r2029 | echo 123 > e | ||
hg add a c e | ||||
hg commit -m "first" -d "1000000 0" a c e | ||||
Benoit Boissinot
|
r1447 | echo 123 > b | ||
Benoit Boissinot
|
r1487 | echo %% should show b unknown | ||
Benoit Boissinot
|
r1447 | hg status | ||
echo 12 > c | ||||
Benoit Boissinot
|
r1487 | echo %% should show b unknown and c modified | ||
Benoit Boissinot
|
r1447 | hg status | ||
hg add b | ||||
Benoit Boissinot
|
r1487 | echo %% should show b added and c modified | ||
Benoit Boissinot
|
r1447 | hg status | ||
hg rm a | ||||
Benoit Boissinot
|
r1487 | echo %% should show a removed, b added and c modified | ||
Benoit Boissinot
|
r1447 | hg status | ||
hg revert a | ||||
Vadim Gelfer
|
r2029 | echo %% should show b added, copy saved, and c modified | ||
Benoit Boissinot
|
r1447 | hg status | ||
hg revert b | ||||
Vadim Gelfer
|
r2029 | 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 | ||||
Benoit Boissinot
|
r1447 | hg status | ||
Vadim Gelfer
|
r2029 | echo %% should show a b b.bak c e | ||
Benoit Boissinot
|
r1447 | ls | ||
Vadim Gelfer
|
r2029 | 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 | ||||
Benoit Boissinot
|
r1447 | |||
true | ||||