]> Cypherpunks repositories - gostls13.git/commitdiff
codereview: add clpatch --ignore_hgpatch_errors.
authorRuss Cox <rsc@golang.org>
Tue, 17 Nov 2009 16:47:48 +0000 (08:47 -0800)
committerRuss Cox <rsc@golang.org>
Tue, 17 Nov 2009 16:47:48 +0000 (08:47 -0800)
  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

lib/codereview/codereview.py

index dd56de8b189d7e43ea6c496c88edbc14f08f34c9..ffcf945be5d182e803a93da47783856abf2bf6f7 100644 (file)
@@ -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#"