# HG changeset patch # User Matt Harbison # Date 1611259279 18000 # Node ID 242a0530823a7536ecf021763bda1c8d69bf959d # Parent ceaa85c47973c170501d0c032c9379ab55b1c8d1 cleanup: ensure log and output messages have a '\n' terminator I noticed this in a blackbox.log where the timestamp for the message after obsdiscovery:452 was merged with the previous message. diff -r ceaa85c47973 -r 242a0530823a hgext3rd/evolve/obsdiscovery.py --- a/hgext3rd/evolve/obsdiscovery.py Wed Jan 20 14:47:22 2021 +0800 +++ b/hgext3rd/evolve/obsdiscovery.py Thu Jan 21 15:01:19 2021 -0500 @@ -449,7 +449,7 @@ self._data.pop(r, None) except (sqlite3.DatabaseError, sqlite3.OperationalError) as exc: repo.ui.log(b'evoext-cache', - b'error while updating obshashrange cache: %s' + b'error while updating obshashrange cache: %s\n' % forcebytestr(exc)) del self._updating return @@ -562,9 +562,9 @@ del self._con self._new.clear() repo.ui.log(b'evoext-cache', - b'error while saving new data: %s' + b'error while saving new data: %s\n' % forcebytestr(exc)) - repo.ui.debug(b'evoext-cache: error while saving new data: %s' + repo.ui.debug(b'evoext-cache: error while saving new data: %s\n' % forcebytestr(exc)) def _trysave(self, repo): @@ -576,7 +576,7 @@ con = self._db() if con is None: repo.ui.log(b'evoext-cache', b'unable to write obshashrange cache' - b' - cannot create database') + b' - cannot create database\n') return with con: for req in _sqliteschema: diff -r ceaa85c47973 -r 242a0530823a hgext3rd/evolve/obsexchange.py --- a/hgext3rd/evolve/obsexchange.py Wed Jan 20 14:47:22 2021 +0800 +++ b/hgext3rd/evolve/obsexchange.py Thu Jan 21 15:01:19 2021 -0500 @@ -59,7 +59,7 @@ | | Falling back to a less efficient fetching method. | -| More efficient fetching method is possible and will be used in the future. +| More efficient fetching method is possible and will be used in the future.\n """ @eh.wrapfunction(exchange, '_pullbundle2extraprepare') diff -r ceaa85c47973 -r 242a0530823a hgext3rd/evolve/stablerangecache.py --- a/hgext3rd/evolve/stablerangecache.py Wed Jan 20 14:47:22 2021 +0800 +++ b/hgext3rd/evolve/stablerangecache.py Thu Jan 21 15:01:19 2021 -0500 @@ -295,8 +295,8 @@ if r'_con' in vars(self): del self._con self._unsavedsubranges.clear() - repo.ui.log(b'evoext-cache', b'error while saving new data: %s' % forcebytestr(exc)) - repo.ui.debug(b'evoext-cache: error while saving new data: %s' % forcebytestr(exc)) + repo.ui.log(b'evoext-cache', b'error while saving new data: %s\n' % forcebytestr(exc)) + repo.ui.debug(b'evoext-cache: error while saving new data: %s\n' % forcebytestr(exc)) def _trysave(self, repo): repo = repo.unfiltered() diff -r ceaa85c47973 -r 242a0530823a hgext3rd/evolve/state.py --- a/hgext3rd/evolve/state.py Wed Jan 20 14:47:22 2021 +0800 +++ b/hgext3rd/evolve/state.py Thu Jan 21 15:01:19 2021 -0500 @@ -111,7 +111,7 @@ try: versionblob = f.read(4) if len(versionblob) < 4: - repo.ui.debug(b'ignoring corrupted evolvestate (file contains %i bits)' + repo.ui.debug(b'ignoring corrupted evolvestate (file contains %i bits)\n' % len(versionblob)) return None version = struct.unpack(b'>I', versionblob)[0] @@ -137,7 +137,7 @@ if rtype == b'C': state[b'current'] = rdata elif rtype.lower(): - repo.ui.debug(b'ignore evolve state record type %s' % rtype) + repo.ui.debug(b'ignore evolve state record type %s\n' % rtype) else: raise error.Abort(_(b"unknown evolvestate field type '%s'") % rtype, hint=_(b'upgrade your evolve')) diff -r ceaa85c47973 -r 242a0530823a hgext3rd/topic/__init__.py --- a/hgext3rd/topic/__init__.py Wed Jan 20 14:47:22 2021 +0800 +++ b/hgext3rd/topic/__init__.py Thu Jan 21 15:01:19 2021 -0500 @@ -1015,7 +1015,7 @@ return ui.status(_(b'changed topic to "%s" on %d revisions\n') % (bmark, rewrote)) - ui.debug(b'removing bookmark "%s" from "%d"' % (bmark, old)) + ui.debug(b'removing bookmark "%s" from "%d"\n' % (bmark, old)) bookmarks.delete(repo, tr, [bmark]) def _changecurrenttopic(repo, newtopic):