##// END OF EJS Templates
add: use lexists so that broken symbolic links are added...
John Coomes -
r23462:afa3fbbc default
parent child Browse files
Show More
@@ -1984,7 +1984,7 b' def add(ui, repo, match, dryrun, listsub'
1984 cca = scmutil.casecollisionauditor(ui, abort, repo.dirstate)
1984 cca = scmutil.casecollisionauditor(ui, abort, repo.dirstate)
1985 for f in wctx.walk(match):
1985 for f in wctx.walk(match):
1986 exact = match.exact(f)
1986 exact = match.exact(f)
1987 if exact or not explicitonly and f not in wctx and repo.wvfs.exists(f):
1987 if exact or not explicitonly and f not in wctx and repo.wvfs.lexists(f):
1988 if cca:
1988 if cca:
1989 cca(f)
1989 cca(f)
1990 names.append(f)
1990 names.append(f)
@@ -3,12 +3,18 b''
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
8 import with add and addremove -- symlink walking should _not_ screwup.
7
9
8 import with addremove -- symlink walking should _not_ screwup.
10 $ hg add
9
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
General Comments 0
You need to be logged in to leave comments. Login now