diff hgext/remotefilelog/remotefilectx.py @ 41140: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 13d4ad8d7801
children 784ab13b340f
line wrap: on
line diff
--- a/hgext/remotefilelog/remotefilectx.py	Tue Jan 08 10:31:10 2019 -0500
+++ b/hgext/remotefilelog/remotefilectx.py	Tue Jan 08 14:48:05 2019 -0800
@@ -226,7 +226,7 @@
             r'reponame': shallowutil.getreponame(repo.ui),
         }
 
-        repo.ui.log('linkrevfixup', 'adjusting linknode', **commonlogkwargs)
+        repo.ui.log('linkrevfixup', 'adjusting linknode\n', **commonlogkwargs)
 
         pc = repo._phasecache
         seenpublic = False
@@ -315,7 +315,7 @@
             return None
         finally:
             elapsed = time.time() - start
-            repo.ui.log('linkrevfixup', logmsg, elapsed=elapsed * 1000,
+            repo.ui.log('linkrevfixup', logmsg + '\n', elapsed=elapsed * 1000,
                         **pycompat.strkwargs(commonlogkwargs))
 
     def _verifylinknode(self, revs, linknode):