910 ui.debug(err) |
923 ui.debug(err) |
911 current_hunk = None |
924 current_hunk = None |
912 continue |
925 continue |
913 hunknum += 1 |
926 hunknum += 1 |
914 if not current_file: |
927 if not current_file: |
915 if sourcefile: |
928 current_file = getpatchfile(afile, bfile, current_hunk) |
916 current_file = patchfile(ui, sourcefile) |
929 if not current_file: |
917 else: |
930 current_file, current_hunk = None, None |
918 current_file = selectfile(afile, bfile, current_hunk, |
931 rejects += 1 |
919 strip, reverse) |
932 continue |
920 current_file = patchfile(ui, current_file) |
|
921 elif state == BFILE and x.startswith('GIT binary patch'): |
933 elif state == BFILE and x.startswith('GIT binary patch'): |
922 current_hunk = binhunk(changed[bfile[2:]][1]) |
934 current_hunk = binhunk(changed[bfile[2:]][1]) |
|
935 hunknum += 1 |
923 if not current_file: |
936 if not current_file: |
924 if sourcefile: |
937 current_file = getpatchfile(afile, bfile, current_hunk) |
925 current_file = patchfile(ui, sourcefile) |
938 if not current_file: |
926 else: |
939 current_file, current_hunk = None, None |
927 current_file = selectfile(afile, bfile, current_hunk, |
940 rejects += 1 |
928 strip, reverse) |
941 continue |
929 current_file = patchfile(ui, current_file) |
|
930 hunknum += 1 |
|
931 current_hunk.extract(fp) |
942 current_hunk.extract(fp) |
932 elif x.startswith('diff --git'): |
943 elif x.startswith('diff --git'): |
933 # check for git diff, scanning the whole patch file if needed |
944 # check for git diff, scanning the whole patch file if needed |
934 m = gitre.match(x) |
945 m = gitre.match(x) |
935 if m: |
946 if m: |