Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/merge.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 | ce818cf215dc |
children | 28e2e3804f2e |
comparison
equal
deleted
inserted
replaced
12031:77bbeafd7519 | 12032:ad787252fed6 |
---|---|
280 if f != fd and move: | 280 if f != fd and move: |
281 moves.append(f) | 281 moves.append(f) |
282 | 282 |
283 # remove renamed files after safely stored | 283 # remove renamed files after safely stored |
284 for f in moves: | 284 for f in moves: |
285 if util.lexists(repo.wjoin(f)): | 285 if os.path.lexists(repo.wjoin(f)): |
286 repo.ui.debug("removing %s\n" % f) | 286 repo.ui.debug("removing %s\n" % f) |
287 os.unlink(repo.wjoin(f)) | 287 os.unlink(repo.wjoin(f)) |
288 | 288 |
289 audit_path = util.path_auditor(repo.root) | 289 audit_path = util.path_auditor(repo.root) |
290 | 290 |
318 if r is None: | 318 if r is None: |
319 updated += 1 | 319 updated += 1 |
320 else: | 320 else: |
321 merged += 1 | 321 merged += 1 |
322 util.set_flags(repo.wjoin(fd), 'l' in flags, 'x' in flags) | 322 util.set_flags(repo.wjoin(fd), 'l' in flags, 'x' in flags) |
323 if f != fd and move and util.lexists(repo.wjoin(f)): | 323 if f != fd and move and os.path.lexists(repo.wjoin(f)): |
324 repo.ui.debug("removing %s\n" % f) | 324 repo.ui.debug("removing %s\n" % f) |
325 os.unlink(repo.wjoin(f)) | 325 os.unlink(repo.wjoin(f)) |
326 elif m == "g": # get | 326 elif m == "g": # get |
327 flags = a[2] | 327 flags = a[2] |
328 repo.ui.note(_("getting %s\n") % f) | 328 repo.ui.note(_("getting %s\n") % f) |