equal
deleted
inserted
replaced
931 goodb = not nullb and os.path.exists(bfile) |
931 goodb = not nullb and os.path.exists(bfile) |
932 createfunc = hunk.createfile |
932 createfunc = hunk.createfile |
933 missing = not goodb and not gooda and not createfunc() |
933 missing = not goodb and not gooda and not createfunc() |
934 |
934 |
935 # some diff programs apparently produce create patches where the |
935 # some diff programs apparently produce create patches where the |
936 # afile is not /dev/null, but rather the same name as the bfile |
936 # afile is not /dev/null, but afile starts with bfile |
937 if missing and afile == bfile: |
937 abasedir = afile[:afile.rfind('/') + 1] |
|
938 bbasedir = bfile[:bfile.rfind('/') + 1] |
|
939 if missing and abasedir == bbasedir and afile.startswith(bfile): |
938 # this isn't very pretty |
940 # this isn't very pretty |
939 hunk.create = True |
941 hunk.create = True |
940 if createfunc(): |
942 if createfunc(): |
941 missing = False |
943 missing = False |
942 else: |
944 else: |