##// END OF EJS Templates
patch: avoid file existence tests when possible in selectfile()
Patrick Mezard -
r5651:e11940d8 default
parent child Browse files
Show More
@@ -796,12 +796,12 b' def selectfile(afile_orig, bfile_orig, h'
796 796 nulla = afile_orig == "/dev/null"
797 797 nullb = bfile_orig == "/dev/null"
798 798 afile = pathstrip(afile_orig, strip)
799 gooda = os.path.exists(afile) and not nulla
799 gooda = not nulla and os.path.exists(afile)
800 800 bfile = pathstrip(bfile_orig, strip)
801 801 if afile == bfile:
802 802 goodb = gooda
803 803 else:
804 goodb = os.path.exists(bfile) and not nullb
804 goodb = not nullb and os.path.exists(bfile)
805 805 createfunc = hunk.createfile
806 806 if reverse:
807 807 createfunc = hunk.rmfile
General Comments 0
You need to be logged in to leave comments. Login now