Mercurial > hg > mercurial-crew-with-dirclash
comparison mercurial/cmdutil.py @ 4571:97111071d26c
addremove: use util.lexists
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Wed, 13 Jun 2007 19:15:58 -0300 |
parents | 8044be585b91 |
children | b25ee3f8f714 |
comparison
equal
deleted
inserted
replaced
4570:6a8e1dd18ba2 | 4571:97111071d26c |
---|---|
572 if src == 'f' and repo.dirstate.state(abs) == '?': | 572 if src == 'f' and repo.dirstate.state(abs) == '?': |
573 add.append(abs) | 573 add.append(abs) |
574 mapping[abs] = rel, exact | 574 mapping[abs] = rel, exact |
575 if repo.ui.verbose or not exact: | 575 if repo.ui.verbose or not exact: |
576 repo.ui.status(_('adding %s\n') % ((pats and rel) or abs)) | 576 repo.ui.status(_('adding %s\n') % ((pats and rel) or abs)) |
577 islink = os.path.islink(target) | 577 if repo.dirstate.state(abs) != 'r' and not util.lexists(target): |
578 if (repo.dirstate.state(abs) != 'r' and not islink | |
579 and not os.path.exists(target)): | |
580 remove.append(abs) | 578 remove.append(abs) |
581 mapping[abs] = rel, exact | 579 mapping[abs] = rel, exact |
582 if repo.ui.verbose or not exact: | 580 if repo.ui.verbose or not exact: |
583 repo.ui.status(_('removing %s\n') % ((pats and rel) or abs)) | 581 repo.ui.status(_('removing %s\n') % ((pats and rel) or abs)) |
584 if not dry_run: | 582 if not dry_run: |