mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 23:38:50 +03:00
patch: move NoHunk detection up with parsing code
This commit is contained in:
parent
bb8be03dba
commit
b4f670a426
@ -1008,12 +1008,13 @@ def applydiff(ui, fp, changed, strip=1, sourcefile=None, reverse=False,
|
||||
if rejmerge:
|
||||
rejmerge(current_file)
|
||||
rejects += len(current_file.rej)
|
||||
|
||||
if not rejects and hunknum == 0 and dopatch and not gitworkdone:
|
||||
raise NoHunks
|
||||
if updatedir and git:
|
||||
updatedir(gitpatches)
|
||||
if rejects:
|
||||
return -1
|
||||
if hunknum == 0 and dopatch and not gitworkdone:
|
||||
raise NoHunks
|
||||
return err
|
||||
|
||||
def diffopts(ui, opts={}, untrusted=False):
|
||||
|
Loading…
Reference in New Issue
Block a user