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