comparison mercurial/commands.py @ 36186:c1628a5eac87

py3: use pycompat.bytestr instead of str Differential Revision: https://phab.mercurial-scm.org/D2264
author Pulkit Goyal <7895pulkit@gmail.com>
date Wed, 14 Feb 2018 17:06:20 +0530
parents b44a47214122
children 1abf089a1d70
comparison
equal deleted inserted replaced
36185:acc8e6e52af6 36186:c1628a5eac87
335 335
336 opmap = [('user', ' ', lambda x: x.fctx.user(), ui.shortuser), 336 opmap = [('user', ' ', lambda x: x.fctx.user(), ui.shortuser),
337 ('number', ' ', lambda x: x.fctx.rev(), formatrev), 337 ('number', ' ', lambda x: x.fctx.rev(), formatrev),
338 ('changeset', ' ', lambda x: hexfn(x.fctx.node()), formathex), 338 ('changeset', ' ', lambda x: hexfn(x.fctx.node()), formathex),
339 ('date', ' ', lambda x: x.fctx.date(), util.cachefunc(datefunc)), 339 ('date', ' ', lambda x: x.fctx.date(), util.cachefunc(datefunc)),
340 ('file', ' ', lambda x: x.fctx.path(), str), 340 ('file', ' ', lambda x: x.fctx.path(), pycompat.bytestr),
341 ('line_number', ':', lambda x: x.lineno, str), 341 ('line_number', ':', lambda x: x.lineno, pycompat.bytestr),
342 ] 342 ]
343 fieldnamemap = {'number': 'rev', 'changeset': 'node'} 343 fieldnamemap = {'number': 'rev', 'changeset': 'node'}
344 344
345 if (not opts.get('user') and not opts.get('changeset') 345 if (not opts.get('user') and not opts.get('changeset')
346 and not opts.get('date') and not opts.get('file')): 346 and not opts.get('date') and not opts.get('file')):