mercurial/patch.py
changeset 12032 ad787252fed6
parent 11820 75de514a50f3
child 12070 fddacca3202e
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)