mercurial/commands.py
changeset 34432 2e32c6a31cc7
parent 34393 fffd3369aa83
child 34434 884b595f5195
equal deleted inserted replaced
34431:52e9310626a8 34432:2e32c6a31cc7
   324                 return '%s ' % hex
   324                 return '%s ' % hex
   325     else:
   325     else:
   326         hexfn = rootfm.hexfunc
   326         hexfn = rootfm.hexfunc
   327         formatrev = formathex = pycompat.bytestr
   327         formatrev = formathex = pycompat.bytestr
   328 
   328 
   329     opmap = [('user', ' ', lambda x: x[0].user(), ui.shortuser),
   329     opmap = [('user', ' ', lambda x: x.fctx.user(), ui.shortuser),
   330              ('number', ' ', lambda x: x[0].rev(), formatrev),
   330              ('number', ' ', lambda x: x.fctx.rev(), formatrev),
   331              ('changeset', ' ', lambda x: hexfn(x[0].node()), formathex),
   331              ('changeset', ' ', lambda x: hexfn(x.fctx.node()), formathex),
   332              ('date', ' ', lambda x: x[0].date(), util.cachefunc(datefunc)),
   332              ('date', ' ', lambda x: x.fctx.date(), util.cachefunc(datefunc)),
   333              ('file', ' ', lambda x: x[0].path(), str),
   333              ('file', ' ', lambda x: x.fctx.path(), str),
   334              ('line_number', ':', lambda x: x[1], str),
   334              ('line_number', ':', lambda x: x.lineno, str),
   335             ]
   335             ]
   336     fieldnamemap = {'number': 'rev', 'changeset': 'node'}
   336     fieldnamemap = {'number': 'rev', 'changeset': 'node'}
   337 
   337 
   338     if (not opts.get('user') and not opts.get('changeset')
   338     if (not opts.get('user') and not opts.get('changeset')
   339         and not opts.get('date') and not opts.get('file')):
   339         and not opts.get('date') and not opts.get('file')):