Commit f74beebb authored by Russ Cox's avatar Russ Cox

codereview: print gofmt message when aborting

R=r
CC=vish
http://go/go-review/1026013
parent b2d3701c
...@@ -594,11 +594,11 @@ def CheckGofmt(ui, repo, files, just_warn=False): ...@@ -594,11 +594,11 @@ def CheckGofmt(ui, repo, files, just_warn=False):
ui.warn("gofmt errors:\n" + errors.rstrip() + "\n") ui.warn("gofmt errors:\n" + errors.rstrip() + "\n")
return return
if len(data) > 0: if len(data) > 0:
msg = "gofmt needs to format these files (run hg gofmt):\n" + data msg = "gofmt needs to format these files (run hg gofmt):\n" + Indent(data, "\t").rstrip()
if just_warn: if just_warn:
ui.warn("warning: " + msg) ui.warn("warning: " + msg + "\n")
else: else:
raise util.Abort() raise util.Abort(msg)
return return
####################################################################### #######################################################################
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment