aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-11-17 08:47:48 -0800
committerRuss Cox <rsc@golang.org>2009-11-17 08:47:48 -0800
commit1a2418f575a3347540069b5deb856bac367e1a49 (patch)
treeddcafe8950c75e4a44383c6a8bbc01080672f041
parentb4586a74297bca626640dc04234b2203dd23007b (diff)
downloadgo-1a2418f575a3347540069b5deb856bac367e1a49.tar.gz
go-1a2418f575a3347540069b5deb856bac367e1a49.zip
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
-rw-r--r--lib/codereview/codereview.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/codereview/codereview.py b/lib/codereview/codereview.py
index dd56de8b18..ffcf945be5 100644
--- a/lib/codereview/codereview.py
+++ b/lib/codereview/codereview.py
@@ -778,7 +778,7 @@ def clpatch(ui, repo, clname, **opts):
os._exit(0)
cmd.stdin.close()
out = cmd.stdout.read()
- if cmd.wait() != 0:
+ if cmd.wait() != 0 and not opts["ignore_hgpatch_failure"]:
return "hgpatch failed"
cl.local = True
cl.files = out.strip().split()
@@ -1174,6 +1174,7 @@ cmdtable = {
"^clpatch": (
clpatch,
[
+ ('', 'ignore_hgpatch_failure', None, 'create CL metadata even if hgpatch fails'),
('', 'no_incoming', None, 'disable check for incoming changes'),
],
"change#"