mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
codereview: make --ignore_hgpatch_failure work again
R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/4627067
This commit is contained in:
parent
7e29f1add8
commit
f79bcb4b86
1 changed files with 6 additions and 4 deletions
|
|
@ -1352,10 +1352,12 @@ def clpatch_or_undo(ui, repo, clname, opts, mode):
|
||||||
repo[vers].description()
|
repo[vers].description()
|
||||||
except:
|
except:
|
||||||
return "local repository is out of date; sync to get %s" % (vers)
|
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 != "":
|
if err != "":
|
||||||
|
if not opts["ignore_hgpatch_failure"]:
|
||||||
return "codereview issue %s is out of date: %s (%s->%s)" % (clname, err, vers, id)
|
return "codereview issue %s is out of date: %s (%s->%s)" % (clname, err, vers, id)
|
||||||
|
else:
|
||||||
|
patch = patch1
|
||||||
argv = ["hgpatch"]
|
argv = ["hgpatch"]
|
||||||
if opts["no_incoming"] or mode == "backport":
|
if opts["no_incoming"] or mode == "backport":
|
||||||
argv += ["--checksync=false"]
|
argv += ["--checksync=false"]
|
||||||
|
|
@ -1369,7 +1371,7 @@ def clpatch_or_undo(ui, repo, clname, opts, mode):
|
||||||
return "hgpatch failed"
|
return "hgpatch failed"
|
||||||
cl.local = True
|
cl.local = True
|
||||||
cl.files = out.strip().split()
|
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
|
return "codereview issue %s has no changed files" % clname
|
||||||
files = ChangedFiles(ui, repo, [], opts)
|
files = ChangedFiles(ui, repo, [], opts)
|
||||||
extra = Sub(cl.files, files)
|
extra = Sub(cl.files, files)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue