comparison hgext/remotefilelog/shallowutil.py @ 41926:92a5fb73b3d5

remotefilelog: add newlines to ui.log() invocations The comment at the top of ui.log() says that the message should be a newline-terminated string. When using the blackbox logger, if the string does not end in a newline, the appearance in the file gets quite messy. This sometimes leaves a string with just the newline as the message, these are logged by the blackbox logger just fine. I don't know what other loggers do when logging structured data and a message that is just the newline. Differential Revision: https://phab.mercurial-scm.org/D5533
author Kyle Lippincott <spectral@google.com>
date Tue, 08 Jan 2019 14:48:05 -0800
parents 3fa4183e7803
children d08c816a11d3
comparison
equal deleted inserted replaced
41925:2e60a77b7058 41926:92a5fb73b3d5
104 return result 104 return result
105 105
106 def reportpackmetrics(ui, prefix, *stores): 106 def reportpackmetrics(ui, prefix, *stores):
107 dicts = [s.getmetrics() for s in stores] 107 dicts = [s.getmetrics() for s in stores]
108 dict = prefixkeys(sumdicts(*dicts), prefix + '_') 108 dict = prefixkeys(sumdicts(*dicts), prefix + '_')
109 ui.log(prefix + "_packsizes", "", **pycompat.strkwargs(dict)) 109 ui.log(prefix + "_packsizes", "\n", **pycompat.strkwargs(dict))
110 110
111 def _parsepackmeta(metabuf): 111 def _parsepackmeta(metabuf):
112 """parse datapack meta, bytes (<metadata-list>) -> dict 112 """parse datapack meta, bytes (<metadata-list>) -> dict
113 113
114 The dict contains raw content - both keys and values are strings. 114 The dict contains raw content - both keys and values are strings.