Commit 1a2418f5 authored by Russ Cox's avatar Russ Cox

codereview: add clpatch --ignore_hgpatch_errors.

  of limited utility but good for creating the metadata
  for an AUTHORS/CONTRIBUTORS change even if
  the patch doesn't apply cleanly.

R=r
https://golang.org/cl/154140
parent b4586a74
...@@ -778,7 +778,7 @@ def clpatch(ui, repo, clname, **opts): ...@@ -778,7 +778,7 @@ def clpatch(ui, repo, clname, **opts):
os._exit(0) os._exit(0)
cmd.stdin.close() cmd.stdin.close()
out = cmd.stdout.read() out = cmd.stdout.read()
if cmd.wait() != 0: if cmd.wait() != 0 and not opts["ignore_hgpatch_failure"]:
return "hgpatch failed" return "hgpatch failed"
cl.local = True cl.local = True
cl.files = out.strip().split() cl.files = out.strip().split()
...@@ -1174,6 +1174,7 @@ cmdtable = { ...@@ -1174,6 +1174,7 @@ cmdtable = {
"^clpatch": ( "^clpatch": (
clpatch, clpatch,
[ [
('', 'ignore_hgpatch_failure', None, 'create CL metadata even if hgpatch fails'),
('', 'no_incoming', None, 'disable check for incoming changes'), ('', 'no_incoming', None, 'disable check for incoming changes'),
], ],
"change#" "change#"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment