comparison hgext/journal.py @ 29675:12f04946053c

journal: use fm.hexfunc() to get full hash in JSON/template output (BC) We generally do that.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 31 Jul 2016 16:38:16 +0900
parents 7503d8874617
children 69890b5dd32b
comparison
equal deleted inserted replaced
29674:996cc60da32c 29675:12f04946053c
473 limit = cmdutil.loglimit(opts) 473 limit = cmdutil.loglimit(opts)
474 entry = None 474 entry = None
475 for count, entry in enumerate(repo.journal.filtered(name=name)): 475 for count, entry in enumerate(repo.journal.filtered(name=name)):
476 if count == limit: 476 if count == limit:
477 break 477 break
478 newhashesstr = ','.join([node.short(hash) for hash in entry.newhashes]) 478 newhashesstr = ','.join([fm.hexfunc(hash) for hash in entry.newhashes])
479 oldhashesstr = ','.join([node.short(hash) for hash in entry.oldhashes]) 479 oldhashesstr = ','.join([fm.hexfunc(hash) for hash in entry.oldhashes])
480 480
481 fm.startitem() 481 fm.startitem()
482 fm.condwrite(ui.verbose, 'oldhashes', '%s -> ', oldhashesstr) 482 fm.condwrite(ui.verbose, 'oldhashes', '%s -> ', oldhashesstr)
483 fm.write('newhashes', '%s', newhashesstr) 483 fm.write('newhashes', '%s', newhashesstr)
484 fm.condwrite(ui.verbose, 'user', ' %-8s', entry.user) 484 fm.condwrite(ui.verbose, 'user', ' %-8s', entry.user)