##// END OF EJS Templates
patch: move NoHunk detection up with parsing code
Patrick Mezard -
r5649:a583117b default
parent child Browse files
Show More
@@ -1008,12 +1008,13 b' def applydiff(ui, fp, changed, strip=1, '
1008 if rejmerge:
1008 if rejmerge:
1009 rejmerge(current_file)
1009 rejmerge(current_file)
1010 rejects += len(current_file.rej)
1010 rejects += len(current_file.rej)
1011
1012 if not rejects and hunknum == 0 and dopatch and not gitworkdone:
1013 raise NoHunks
1011 if updatedir and git:
1014 if updatedir and git:
1012 updatedir(gitpatches)
1015 updatedir(gitpatches)
1013 if rejects:
1016 if rejects:
1014 return -1
1017 return -1
1015 if hunknum == 0 and dopatch and not gitworkdone:
1016 raise NoHunks
1017 return err
1018 return err
1018
1019
1019 def diffopts(ui, opts={}, untrusted=False):
1020 def diffopts(ui, opts={}, untrusted=False):
General Comments 0
You need to be logged in to leave comments. Login now