Mercurial > hg > mercurial-crew-with-dirclash
comparison tests/test-revert @ 2036:c9226bcc288d
Don't abort when backup files already exist. Don't allow alternative names.
Rationale:
- When the user wants to revert, he shouldn't be stopped from doing
this just because some old backups will be overwritten.
- To not clobber important files by accident, alternative names for backup
files were disabled. As the backup target now has a fixed name, the user
doesn't have to be informed about the backup copy (unless --verbose)
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Sat, 01 Apr 2006 11:58:50 +0200 |
parents | d436b21b20dc |
children | a514c7509fa9 |
comparison
equal
deleted
inserted
replaced
2030:8d9ec30d58bc | 2036:c9226bcc288d |
---|---|
20 hg status | 20 hg status |
21 hg revert a | 21 hg revert a |
22 echo %% should show b added, copy saved, and c modified | 22 echo %% should show b added, copy saved, and c modified |
23 hg status | 23 hg status |
24 hg revert b | 24 hg revert b |
25 echo %% should show b unknown, b.bak unknown, and c modified | 25 echo %% should show b unknown, b.orig unknown, and c modified |
26 hg status | 26 hg status |
27 hg revert --no-backup c | 27 hg revert --no-backup c |
28 echo %% should show unknown: b b.bak | 28 echo %% should show unknown: b b.orig |
29 hg status | 29 hg status |
30 echo %% should show a b b.bak c e | 30 echo %% should show a b b.orig c e |
31 ls | 31 ls |
32 echo %% should save backup to e.0 | 32 echo %% should verbosely save backup to e.orig |
33 echo z > e | 33 echo z > e |
34 hg revert --backup='%p.%R' | 34 hg revert -v |
35 echo %% should say no changes needed | 35 echo %% should say no changes needed |
36 hg revert a | 36 hg revert a |
37 echo %% should say file not managed | 37 echo %% should say file not managed |
38 echo q > q | 38 echo q > q |
39 hg revert q | 39 hg revert q |