Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/cmdutil.py @ 12032:ad787252fed6
util: remove lexists, Python 2.4 introduced os.path.lexists
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Wed, 25 Aug 2010 16:23:32 +0200 |
parents | 60bfb876dc45 |
children | 6f833fc3ccab |
comparison
equal
deleted
inserted
replaced
12031:77bbeafd7519 | 12032:ad787252fed6 |
---|---|
295 exact = m.exact(abs) | 295 exact = m.exact(abs) |
296 if good and abs not in repo.dirstate: | 296 if good and abs not in repo.dirstate: |
297 unknown.append(abs) | 297 unknown.append(abs) |
298 if repo.ui.verbose or not exact: | 298 if repo.ui.verbose or not exact: |
299 repo.ui.status(_('adding %s\n') % ((pats and rel) or abs)) | 299 repo.ui.status(_('adding %s\n') % ((pats and rel) or abs)) |
300 elif repo.dirstate[abs] != 'r' and (not good or not util.lexists(target) | 300 elif repo.dirstate[abs] != 'r' and (not good or not os.path.lexists(target) |
301 or (os.path.isdir(target) and not os.path.islink(target))): | 301 or (os.path.isdir(target) and not os.path.islink(target))): |
302 deleted.append(abs) | 302 deleted.append(abs) |
303 if repo.ui.verbose or not exact: | 303 if repo.ui.verbose or not exact: |
304 repo.ui.status(_('removing %s\n') % ((pats and rel) or abs)) | 304 repo.ui.status(_('removing %s\n') % ((pats and rel) or abs)) |
305 # for finding renames | 305 # for finding renames |