--- a/mercurial/formatter.py Sun Jul 31 16:56:26 2016 +0900
+++ b/mercurial/formatter.py Sun Jul 31 17:07:29 2016 +0900
@@ -47,6 +47,10 @@
self._showitem()
self._item = {}
@staticmethod
+ def formatdate(date, fmt='%a %b %d %H:%M:%S %Y %1%2'):
+ '''convert date tuple to appropriate format'''
+ return date
+ @staticmethod
def formatlist(data, name, fmt='%s', sep=' '):
'''convert iterable to appropriate list format'''
return list(data)
@@ -84,6 +88,10 @@
def startitem(self):
pass
@staticmethod
+ def formatdate(date, fmt='%a %b %d %H:%M:%S %Y %1%2'):
+ '''stringify date tuple in the given format'''
+ return util.datestr(date, fmt)
+ @staticmethod
def formatlist(data, name, fmt='%s', sep=' '):
'''stringify iterable separated by sep'''
return sep.join(fmt % e for e in data)