try fixing whitespaces
This commit is contained in:
parent
56d9ec34ab
commit
c3c8f039cf
1 changed files with 1 additions and 1 deletions
|
@ -159,7 +159,7 @@ class ApplyPatch:
|
||||||
print('Applying diff {} for revision {}...'.format(diff_id, diff_to_str(revision_id)))
|
print('Applying diff {} for revision {}...'.format(diff_id, diff_to_str(revision_id)))
|
||||||
# TODO: print diff or URL to it
|
# TODO: print diff or URL to it
|
||||||
diff = try_call(lambda: self.phab.differential.getrawdiff(diffID=str(diff_id)).response)
|
diff = try_call(lambda: self.phab.differential.getrawdiff(diffID=str(diff_id)).response)
|
||||||
proc = subprocess.run('git apply --ignore-whitespace -', input=diff, shell=True, text=True,
|
proc = subprocess.run('git apply --ignore-whitespace --whitespace=fix -', input=diff, shell=True, text=True,
|
||||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
if proc.returncode != 0:
|
if proc.returncode != 0:
|
||||||
raise Exception('Applying patch failed:\n{}'.format(proc.stdout + proc.stderr))
|
raise Exception('Applying patch failed:\n{}'.format(proc.stdout + proc.stderr))
|
||||||
|
|
Loading…
Reference in a new issue