Show More
@@ -988,8 +988,7 b' def iterhunks(ui, fp, sourcefile=None):' | |||||
988 | if hunknum == 0 and dopatch and not gitworkdone: |
|
988 | if hunknum == 0 and dopatch and not gitworkdone: | |
989 | raise NoHunks |
|
989 | raise NoHunks | |
990 |
|
990 | |||
991 |
def applydiff(ui, fp, changed, strip=1, sourcefile=None, reverse=False |
|
991 | def applydiff(ui, fp, changed, strip=1, sourcefile=None, reverse=False): | |
992 | rejmerge=None, updatedir=None): |
|
|||
993 | """reads a patch from fp and tries to apply it. The dict 'changed' is |
|
992 | """reads a patch from fp and tries to apply it. The dict 'changed' is | |
994 | filled in with all of the filenames changed by the patch. Returns 0 |
|
993 | filled in with all of the filenames changed by the patch. Returns 0 | |
995 | for a clean patch, -1 if any rejects were found and 1 if there was |
|
994 | for a clean patch, -1 if any rejects were found and 1 if there was | |
@@ -1004,8 +1003,6 b' def applydiff(ui, fp, changed, strip=1, ' | |||||
1004 | if not current_file: |
|
1003 | if not current_file: | |
1005 | return 0 |
|
1004 | return 0 | |
1006 | current_file.close() |
|
1005 | current_file.close() | |
1007 | if rejmerge: |
|
|||
1008 | rejmerge(current_file) |
|
|||
1009 | return len(current_file.rej) |
|
1006 | return len(current_file.rej) | |
1010 |
|
1007 | |||
1011 | for state, values in iterhunks(ui, fp, sourcefile): |
|
1008 | for state, values in iterhunks(ui, fp, sourcefile): | |
@@ -1047,8 +1044,6 b' def applydiff(ui, fp, changed, strip=1, ' | |||||
1047 |
|
1044 | |||
1048 | rejects += closefile() |
|
1045 | rejects += closefile() | |
1049 |
|
1046 | |||
1050 | if updatedir and gitpatches: |
|
|||
1051 | updatedir(gitpatches) |
|
|||
1052 | if rejects: |
|
1047 | if rejects: | |
1053 | return -1 |
|
1048 | return -1 | |
1054 | return err |
|
1049 | return err |
General Comments 0
You need to be logged in to leave comments.
Login now