patchutils: Be less silent about patches that don't apply.

This commit is contained in:
Zebediah Figura 2018-09-10 19:32:35 -05:00
parent 3cc8f97398
commit 28e66e552f

View File

@ -398,12 +398,12 @@ def apply_patch(original, patchfile, reverse=False, fuzz=2):
shutil.copyfileobj(fp, result)
result.close()
cmdline = ["patch", "--no-backup-if-mismatch", "--force", "--silent", "-r", "-"]
cmdline = ["patch", "--no-backup-if-mismatch", "--force", "-r", "-"]
if reverse: cmdline.append("--reverse")
if fuzz != 2: cmdline.append("--fuzz=%d" % fuzz)
cmdline += [result.name, patchfile.name]
exitcode = subprocess.call(cmdline, stdout=_devnull, stderr=_devnull)
exitcode = subprocess.call(cmdline)
if exitcode != 0:
raise PatchApplyError("Failed to apply patch (exitcode %d)." % exitcode)