Mercurial > evolve
changeset 5721:242a0530823a stable
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.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Thu, 21 Jan 2021 15:01:19 -0500 |
parents | ceaa85c47973 |
children | 9fe35f4bc173 |
files | hgext3rd/evolve/obsdiscovery.py hgext3rd/evolve/obsexchange.py hgext3rd/evolve/stablerangecache.py hgext3rd/evolve/state.py hgext3rd/topic/__init__.py |
diffstat | 5 files changed, 10 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- 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:
--- 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')
--- 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()
--- 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'))
--- 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):