equal
deleted
inserted
replaced
925 else: |
925 else: |
926 goodb = not nullb and os.path.exists(bfile) |
926 goodb = not nullb and os.path.exists(bfile) |
927 createfunc = hunk.createfile |
927 createfunc = hunk.createfile |
928 missing = not goodb and not gooda and not createfunc() |
928 missing = not goodb and not gooda and not createfunc() |
929 |
929 |
930 # some diff programs apparently produce create patches where the |
930 # some diff programs apparently produce patches where the afile is |
931 # afile is not /dev/null, but afile starts with bfile |
931 # not /dev/null, but afile starts with bfile |
932 abasedir = afile[:afile.rfind('/') + 1] |
932 abasedir = afile[:afile.rfind('/') + 1] |
933 bbasedir = bfile[:bfile.rfind('/') + 1] |
933 bbasedir = bfile[:bfile.rfind('/') + 1] |
934 if missing and abasedir == bbasedir and afile.startswith(bfile): |
934 if missing and abasedir == bbasedir and afile.startswith(bfile): |
935 # this isn't very pretty |
935 # this isn't very pretty |
936 hunk.create = True |
936 hunk.create = True |