##// END OF EJS Templates
Add debugaddremove alias to addremove, so it doesn't show up in 'hg help'....
Add debugaddremove alias to addremove, so it doesn't show up in 'hg help'. Add an explicit description of 'hg commit --addremove'.

File last commit:

r2157:1e82f233 default
r2184:2477a718 default
Show More
test-revert
71 lines | 1.3 KiB | text/plain | TextLexer
Benoit Boissinot
revert added and removed files to their normal state before reverting...
r1447 #!/bin/sh
hg init
echo 123 > a
echo 123 > c
Vadim Gelfer
rewrite revert command. fix issues 93, 123, 147....
r2029 echo 123 > e
hg add a c e
hg commit -m "first" -d "1000000 0" a c e
Benoit Boissinot
revert added and removed files to their normal state before reverting...
r1447 echo 123 > b
Benoit Boissinot
fix handling of files of unsupported type in the walk code...
r1487 echo %% should show b unknown
Benoit Boissinot
revert added and removed files to their normal state before reverting...
r1447 hg status
echo 12 > c
Benoit Boissinot
fix handling of files of unsupported type in the walk code...
r1487 echo %% should show b unknown and c modified
Benoit Boissinot
revert added and removed files to their normal state before reverting...
r1447 hg status
hg add b
Benoit Boissinot
fix handling of files of unsupported type in the walk code...
r1487 echo %% should show b added and c modified
Benoit Boissinot
revert added and removed files to their normal state before reverting...
r1447 hg status
hg rm a
Benoit Boissinot
fix handling of files of unsupported type in the walk code...
r1487 echo %% should show a removed, b added and c modified
Benoit Boissinot
revert added and removed files to their normal state before reverting...
r1447 hg status
hg revert a
Vadim Gelfer
rewrite revert command. fix issues 93, 123, 147....
r2029 echo %% should show b added, copy saved, and c modified
Benoit Boissinot
revert added and removed files to their normal state before reverting...
r1447 hg status
hg revert b
Thomas Arendsen Hein
Minor fix for revert: No need to make a backup when forgetting added files....
r2043 echo %% should show b unknown, and c modified
Vadim Gelfer
rewrite revert command. fix issues 93, 123, 147....
r2029 hg status
hg revert --no-backup c
Thomas Arendsen Hein
Minor fix for revert: No need to make a backup when forgetting added files....
r2043 echo %% should show unknown: b
Benoit Boissinot
revert added and removed files to their normal state before reverting...
r1447 hg status
Thomas Arendsen Hein
Minor fix for revert: No need to make a backup when forgetting added files....
r2043 echo %% should show a b c e
Benoit Boissinot
revert added and removed files to their normal state before reverting...
r1447 ls
Thomas Arendsen Hein
Don't abort when backup files already exist. Don't allow alternative names....
r2036 echo %% should verbosely save backup to e.orig
Vadim Gelfer
rewrite revert command. fix issues 93, 123, 147....
r2029 echo z > e
Thomas Arendsen Hein
Don't abort when backup files already exist. Don't allow alternative names....
r2036 hg revert -v
Vadim Gelfer
rewrite revert command. fix issues 93, 123, 147....
r2029 echo %% should say no changes needed
hg revert a
echo %% should say file not managed
echo q > q
hg revert q
Vadim Gelfer
small changes to revert command....
r2042 rm q
Vadim Gelfer
rewrite revert command. fix issues 93, 123, 147....
r2029 echo %% should say file not found
hg revert notfound
Vadim Gelfer
small changes to revert command....
r2042 hg rm a
hg commit -m "second" -d "1000000 0"
echo z > z
hg add z
hg st
echo %% should add a, forget z
hg revert -r0
echo %% should forget a
hg revert -rtip
rm -f a *.orig
echo %% should silently add a
hg revert -r0 a
hg st a
Benoit Boissinot
revert added and removed files to their normal state before reverting...
r1447
Vadim Gelfer
make test-revert check executable bit.
r2157 hg update -C
chmod +x c
hg revert
echo %% should print non-executable
test -x c || echo non-executable
chmod +x c
hg commit -d '1000001 0' -m exe
chmod -x c
hg revert
echo %% should print executable
test -x c && echo executable
Benoit Boissinot
revert added and removed files to their normal state before reverting...
r1447 true