##// END OF EJS Templates
forgot to rerun tests after changed backup extension to .orig....
forgot to rerun tests after changed backup extension to .orig. thomas a.h. found this.

File last commit:

r2029:d436b21b default
r2030:8d9ec30d default
Show More
test-revert
43 lines | 875 B | text/plain | TextLexer
#!/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