summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2011-06-27 13:45:17 -0400
committerRuss Cox <rsc@golang.org>2011-06-27 13:45:17 -0400
commite377719887b8216aa561592a63423c6b8e4c87b5 (patch)
tree6c6bdfbe328b7dfa4fdfb32dc224c2547662f476 /lib
parente76740bc082cef080c6921202cd08352e931a5e9 (diff)
downloadgo-e377719887b8216aa561592a63423c6b8e4c87b5.tar.gz
codereview: make --ignore_hgpatch_failure work again
R=golang-dev, bradfitz CC=golang-dev http://codereview.appspot.com/4627067
Diffstat (limited to 'lib')
-rw-r--r--lib/codereview/codereview.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/codereview/codereview.py b/lib/codereview/codereview.py
index a222919d8..0b636c06a 100644
--- a/lib/codereview/codereview.py
+++ b/lib/codereview/codereview.py
@@ -1352,10 +1352,12 @@ def clpatch_or_undo(ui, repo, clname, opts, mode):
repo[vers].description()
except:
return "local repository is out of date; sync to get %s" % (vers)
- patch, err = portPatch(repo, patch, vers, id)
+ patch1, err = portPatch(repo, patch, vers, id)
if err != "":
- return "codereview issue %s is out of date: %s (%s->%s)" % (clname, err, vers, id)
-
+ if not opts["ignore_hgpatch_failure"]:
+ return "codereview issue %s is out of date: %s (%s->%s)" % (clname, err, vers, id)
+ else:
+ patch = patch1
argv = ["hgpatch"]
if opts["no_incoming"] or mode == "backport":
argv += ["--checksync=false"]
@@ -1369,7 +1371,7 @@ def clpatch_or_undo(ui, repo, clname, opts, mode):
return "hgpatch failed"
cl.local = True
cl.files = out.strip().split()
- if not cl.files:
+ if not cl.files and not opts["ignore_hgpatch_failure"]:
return "codereview issue %s has no changed files" % clname
files = ChangedFiles(ui, repo, [], opts)
extra = Sub(cl.files, files)