Mercurial > public > mercurial-scm > hg
comparison mercurial/patch.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 | 75de514a50f3 |
children | fddacca3202e |
comparison
equal
deleted
inserted
replaced
12031:77bbeafd7519 | 12032:ad787252fed6 |
---|---|
916 | 916 |
917 def selectfile(afile_orig, bfile_orig, hunk, strip): | 917 def selectfile(afile_orig, bfile_orig, hunk, strip): |
918 nulla = afile_orig == "/dev/null" | 918 nulla = afile_orig == "/dev/null" |
919 nullb = bfile_orig == "/dev/null" | 919 nullb = bfile_orig == "/dev/null" |
920 abase, afile = pathstrip(afile_orig, strip) | 920 abase, afile = pathstrip(afile_orig, strip) |
921 gooda = not nulla and util.lexists(afile) | 921 gooda = not nulla and os.path.lexists(afile) |
922 bbase, bfile = pathstrip(bfile_orig, strip) | 922 bbase, bfile = pathstrip(bfile_orig, strip) |
923 if afile == bfile: | 923 if afile == bfile: |
924 goodb = gooda | 924 goodb = gooda |
925 else: | 925 else: |
926 goodb = not nullb and os.path.exists(bfile) | 926 goodb = not nullb and os.path.exists(bfile) |