Commit Graph

20 Commits

Author SHA1 Message Date
Alexis S. L. Carvalho
85673c1586 status: put added files that have disappeared in the deleted list
This gives the user an indication that something went wrong with this file:

$ hg add foo
$ rm foo
$ hg status foo
! foo

Fixes issue212.
2008-02-14 18:08:16 -02:00
Alexis S. L. Carvalho
2af8c0c0fe revert: unify forget and remove lists
This doesn't make a difference right now, but after the next revision
some files in state 'a' may end up in the deleted list, and revert
won't be able to just remove all files in that list.
2008-02-14 18:08:16 -02:00
Alexis S. L. Carvalho
0cc1119511 revert: don't assume ignored files will be returned in the unknown list
That's just an artifact of the current implementation, and I'll change
that soon.

Bonus points:
- we don't care about the unknown list at all
- we don't print an extra message if we try to revert a removed file
  that is not present in the target revision
2008-02-08 18:07:55 -02:00
Brendan Cully
ebae83c8bb When reverting a file which was renamed, also revert the old name 2007-08-29 16:15:23 -07:00
Alexis S. L. Carvalho
dd2869375e Merge some matcher fixes/cleanups and add some more hg locate tests 2007-03-16 22:58:49 -03:00
Alexis S. L. Carvalho
a782e3309d util._matcher: use "." as the root of empty {rel,}path patterns
Should fix issue332. Really.
2007-03-16 22:48:20 -03:00
Thomas Arendsen Hein
7701e96286 Don't use -f for rm in tests where not needed. Drop /bin/ from /bin/rm. 2006-12-26 14:17:48 +01:00
Alexis S. L. Carvalho
459844ad17 Fix confusing message from hg revert (issue332)
% mkdir sub1
   % touch sub1/file1
   % hg add sub1/
   adding sub1/file1
   % hg rev sub1
   sub1: No such file in rev 53588684b6e6
   forgetting sub1/file1
2007-03-16 00:22:52 -03:00
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