comparison mercurial/ui.py @ 45033:b4b6ff83ed9c

ui: fix Python 2.7 support for ui.timestamp-output Differential Revision: https://phab.mercurial-scm.org/D8675
author Joerg Sonnenberger <joerg@bec.de>
date Thu, 02 Jul 2020 19:54:44 +0200
parents 24b1a8eb73aa
children 02b17231f6c3
comparison
equal deleted inserted replaced
45032:df3660cc60f5 45033:b4b6ff83ed9c
1227 b'status', 1227 b'status',
1228 b'warning', 1228 b'warning',
1229 } 1229 }
1230 if timestamp: 1230 if timestamp:
1231 args = ( 1231 args = (
1232 b'[%s] ' % bytes(datetime.datetime.now().isoformat(), 'ASCII'), 1232 b'[%s] '
1233 % pycompat.bytestr(datetime.datetime.now().isoformat()),
1233 ) + args 1234 ) + args
1234 _writemsgwith(self._write, dest, *args, **opts) 1235 _writemsgwith(self._write, dest, *args, **opts)
1235 if timestamp: 1236 if timestamp:
1236 dest.flush() 1237 dest.flush()
1237 1238