mercurial/templatekw.py
changeset 38299 88e7105b5cd9
parent 38285 8d6109b49b31
child 38306 523f64466a05
equal deleted inserted replaced
38298:af0e88e64ede 38299:88e7105b5cd9
   238 
   238 
   239 @templatekeyword('date', requires={'ctx'})
   239 @templatekeyword('date', requires={'ctx'})
   240 def showdate(context, mapping):
   240 def showdate(context, mapping):
   241     """Date information. The date when the changeset was committed."""
   241     """Date information. The date when the changeset was committed."""
   242     ctx = context.resource(mapping, 'ctx')
   242     ctx = context.resource(mapping, 'ctx')
   243     return templateutil.date(ctx.date())
   243     # the default string format is '<float(unixtime)><tzoffset>' because
       
   244     # python-hglib splits date at decimal separator.
       
   245     return templateutil.date(ctx.date(), showfmt='%d.0%d')
   244 
   246 
   245 @templatekeyword('desc', requires={'ctx'})
   247 @templatekeyword('desc', requires={'ctx'})
   246 def showdescription(context, mapping):
   248 def showdescription(context, mapping):
   247     """String. The text of the changeset description."""
   249     """String. The text of the changeset description."""
   248     ctx = context.resource(mapping, 'ctx')
   250     ctx = context.resource(mapping, 'ctx')