Commit Graph

12 Commits

Author SHA1 Message Date
Benoit Boissinot
5e11bd63c0 fix incorrect warning when walking on a particular rev
when a directory was given instead of a file it reported
incorrectly 'No such file or directory in rev <rev>'
we test if the file is a prefix directory
2006-08-28 21:49:02 +02:00
Vadim Gelfer
38dd424903 revert: require --all to revert all files. 2006-08-21 09:44:52 -07:00
Vadim Gelfer
cd6ded15df revert: fix corner case found by faheem mitha.
if file not in dest manifest, remove only if in source manifest.
2006-05-11 22:10:47 -07:00
Vadim Gelfer
f04cb6342b make test-revert check executable bit. 2006-04-29 20:39:28 -07:00
Thomas Arendsen Hein
8ab8678cb0 Minor fix for revert: No need to make a backup when forgetting added files.
echo foo > foo && hg add foo && hg revert foo
creates foo.orig, though foo is not changed or deleted.
2006-04-03 21:01:33 +02:00
Vadim Gelfer
0279e68d84 small changes to revert command.
fix bug 93: work with files that are in target manifest but not
dirstate.
2006-04-03 10:02:09 -07:00
Thomas Arendsen Hein
51c7d29d15 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)
2006-04-01 11:58:50 +02:00
Vadim Gelfer
cd9a2c218d rewrite revert command. fix issues 93, 123, 147.
new version does these things:

- saves backup copies of modified files (issue 147)

- prints output like other commands, and errors when files not found
  (issue 123)

- marks files added/removed (issue 93)
2006-03-31 10:37:25 -08:00
Thomas Arendsen Hein
1b244c77c7 Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero.
Some systems show "Thu Jan 01" instead of "Thu Jan  1", which breaks tests.
Using "1000000" yields "Mon Jan 12 13:46:40 1970", which looks the same on
all systems.
2006-03-13 13:05:41 +01:00
Benoit Boissinot
0bbf5d2b87 fix handling of files of unsupported type in the walk code
if a file was of unsupported type, it was considered as 'seen' while
walking. this way it was possible to have file in the dirstate not
yielded by the walk function.
2005-11-02 15:46:31 -08:00
Matt Mackall
4da8c5ab00 Add test-confused-revert, fix permissions on test-revert 2005-10-25 15:54:44 -07:00
Benoit Boissinot
27f31c20c2 revert added and removed files to their normal state before reverting
add a test for revert
2005-10-25 15:51:28 -07:00