mirror of
https://github.com/golang/go
synced 2024-11-22 06:04:39 -07:00
make hg mail more forgiving:
create CL first, even if gofmt is needed or no reviewers listed. R=r http://go/go-review/1025025
This commit is contained in:
parent
6fff7b2399
commit
b1a52ce4a3
@ -896,9 +896,9 @@ def mail(ui, repo, *pats, **opts):
|
|||||||
cl, err = CommandLineCL(ui, repo, pats, opts)
|
cl, err = CommandLineCL(ui, repo, pats, opts)
|
||||||
if err != "":
|
if err != "":
|
||||||
return err
|
return err
|
||||||
|
cl.Upload(ui, repo, gofmt_just_warn=True)
|
||||||
if not cl.reviewer:
|
if not cl.reviewer:
|
||||||
return "no reviewers listed in CL"
|
return "no reviewers listed in CL"
|
||||||
cl.Upload(ui, repo)
|
|
||||||
pmsg = "Hello " + JoinComma(cl.reviewer)
|
pmsg = "Hello " + JoinComma(cl.reviewer)
|
||||||
if cl.cc:
|
if cl.cc:
|
||||||
pmsg += " (cc: %s)" % (', '.join(cl.cc),)
|
pmsg += " (cc: %s)" % (', '.join(cl.cc),)
|
||||||
@ -1002,7 +1002,12 @@ def submit(ui, repo, *pats, **opts):
|
|||||||
|
|
||||||
# upload, to sync current patch and also get change number if CL is new.
|
# upload, to sync current patch and also get change number if CL is new.
|
||||||
if not cl.original_author:
|
if not cl.original_author:
|
||||||
cl.Upload(ui, repo)
|
cl.Upload(ui, repo, gofmt_just_warn=True)
|
||||||
|
|
||||||
|
# check gofmt for real; allowed upload to warn in order to save CL.
|
||||||
|
cl.Flush(ui, repo)
|
||||||
|
CheckGofmt(ui, repo, cl.files)
|
||||||
|
|
||||||
about += "%s%s\n" % (server_url_base, cl.name)
|
about += "%s%s\n" % (server_url_base, cl.name)
|
||||||
|
|
||||||
if cl.original_author:
|
if cl.original_author:
|
||||||
|
Loading…
Reference in New Issue
Block a user