comparison mercurial/patch.py @ 7783:2c5b2abfb8be

patch: teach selectfile about symlinks (issue1438)
author Matt Mackall <mpm@selenic.com>
date Mon, 16 Feb 2009 17:37:23 -0600
parents e617f2e99e61
children 162fd31bbd93
comparison
equal deleted inserted replaced
7782:140429276b63 7783:2c5b2abfb8be
749 return path[:i].lstrip(), path[i:].rstrip() 749 return path[:i].lstrip(), path[i:].rstrip()
750 750
751 nulla = afile_orig == "/dev/null" 751 nulla = afile_orig == "/dev/null"
752 nullb = bfile_orig == "/dev/null" 752 nullb = bfile_orig == "/dev/null"
753 abase, afile = pathstrip(afile_orig, strip) 753 abase, afile = pathstrip(afile_orig, strip)
754 gooda = not nulla and os.path.exists(afile) 754 gooda = not nulla and util.lexists(afile)
755 bbase, bfile = pathstrip(bfile_orig, strip) 755 bbase, bfile = pathstrip(bfile_orig, strip)
756 if afile == bfile: 756 if afile == bfile:
757 goodb = gooda 757 goodb = gooda
758 else: 758 else:
759 goodb = not nullb and os.path.exists(bfile) 759 goodb = not nullb and os.path.exists(bfile)