Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/cmdutil.py @ 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 | 341e4798c24d |
children | 32e68271a037 |
comparison
equal
deleted
inserted
replaced
23461:ffef6d503ab2 | 23462:afa3fbbcabd3 |
---|---|
1982 abort, warn = scmutil.checkportabilityalert(ui) | 1982 abort, warn = scmutil.checkportabilityalert(ui) |
1983 if abort or warn: | 1983 if abort or warn: |
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) |
1991 if ui.verbose or not exact: | 1991 if ui.verbose or not exact: |
1992 ui.status(_('adding %s\n') % match.rel(join(f))) | 1992 ui.status(_('adding %s\n') % match.rel(join(f))) |