mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 23:45:44 +01:00
ensure each message line printed in the Mercurial hook gets a trailing newline
I noticed that the exception printed in the previous commit started on the same line as the print for the `str(e)` case right before it. Since this also prints the content of urllib2.URLError.read(), it seems better to remove any existing newline and re-add it, than to just assume the `str(e)` case was the only problem.
This commit is contained in:
@@ -46,7 +46,7 @@ def printMessages(ui, msgs):
|
||||
for line in msgs:
|
||||
if line.startswith("_e") or line.startswith("_n"):
|
||||
line = line[2:];
|
||||
ui.warn(line);
|
||||
ui.warn('%s\n' % line.rstrip())
|
||||
|
||||
def callHookUrl(ui, repo, hooktype, node):
|
||||
abort = True
|
||||
|
||||
Reference in New Issue
Block a user