mercurial/patch.py
changeset 7783 2c5b2abfb8be
parent 7753 e617f2e99e61
child 7860 162fd31bbd93
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)