comparison tests/test-symlinks.t @ 23462:afa3fbbcabd3

add: use lexists so that broken symbolic links are added This restores the add behavior prior to d8cdd46f426d and matches the behavior of addremove.
author John Coomes <john.coomes@oracle.com>
date Wed, 03 Dec 2014 14:33:29 -0800
parents 7a9cbb315d84
children 4d2b9b304ad0
comparison
equal deleted inserted replaced
23461:ffef6d503ab2 23462:afa3fbbcabd3
1 #require symlink 1 #require symlink
2 2
3 == tests added in 0.7 == 3 == tests added in 0.7 ==
4 4
5 $ hg init test-symlinks-0.7; cd test-symlinks-0.7; 5 $ hg init test-symlinks-0.7; cd test-symlinks-0.7;
6 $ touch foo; ln -s foo bar; 6 $ touch foo; ln -s foo bar; ln -s nonexistent baz
7 7
8 import with addremove -- symlink walking should _not_ screwup. 8 import with add and addremove -- symlink walking should _not_ screwup.
9 9
10 $ hg add
11 adding bar
12 adding baz
13 adding foo
14 $ hg forget bar baz foo
10 $ hg addremove 15 $ hg addremove
11 adding bar 16 adding bar
17 adding baz
12 adding foo 18 adding foo
13 19
14 commit -- the symlink should _not_ appear added to dir state 20 commit -- the symlink should _not_ appear added to dir state
15 21
16 $ hg commit -m 'initial' 22 $ hg commit -m 'initial'