comparison mercurial/cmdutil.py @ 38575:152f4822d210

pycompat: move rapply() from util I want to use rapply() in utils.* modules, but that would introduce a reference cycle util -> utils.* -> util. Moving rapply() to pycompat should be okay since it mostly serves as a compatibility helper.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 10 Jun 2018 17:07:29 +0900
parents 7ae0ea739770
children ffd08ec22955
comparison
equal deleted inserted replaced
38574:f442c9494ec7 38575:152f4822d210
1678 fm.write('parentnodes', '{%s} ', 1678 fm.write('parentnodes', '{%s} ',
1679 fm.formatlist(map(hex, parents), name='node', sep=', ')) 1679 fm.formatlist(map(hex, parents), name='node', sep=', '))
1680 fm.write('date', '(%s) ', fm.formatdate(marker.date())) 1680 fm.write('date', '(%s) ', fm.formatdate(marker.date()))
1681 meta = marker.metadata().copy() 1681 meta = marker.metadata().copy()
1682 meta.pop('date', None) 1682 meta.pop('date', None)
1683 smeta = util.rapply(pycompat.maybebytestr, meta) 1683 smeta = pycompat.rapply(pycompat.maybebytestr, meta)
1684 fm.write('metadata', '{%s}', fm.formatdict(smeta, fmt='%r: %r', sep=', ')) 1684 fm.write('metadata', '{%s}', fm.formatdict(smeta, fmt='%r: %r', sep=', '))
1685 fm.plain('\n') 1685 fm.plain('\n')
1686 1686
1687 def finddate(ui, repo, date): 1687 def finddate(ui, repo, date):
1688 """Find the tipmost changeset that matches the given date spec""" 1688 """Find the tipmost changeset that matches the given date spec"""