mercurial/cmdutil.py
changeset 31171 1ec89cf0ea49
parent 31169 48a8b2e5fe31
child 31196 3af9a9628ecf
equal deleted inserted replaced
31170:e64b70c96338 31171:1ec89cf0ea49
  1440 class changeset_templater(changeset_printer):
  1440 class changeset_templater(changeset_printer):
  1441     '''format changeset information.'''
  1441     '''format changeset information.'''
  1442 
  1442 
  1443     def __init__(self, ui, repo, matchfn, diffopts, tmpl, mapfile, buffered):
  1443     def __init__(self, ui, repo, matchfn, diffopts, tmpl, mapfile, buffered):
  1444         changeset_printer.__init__(self, ui, repo, matchfn, diffopts, buffered)
  1444         changeset_printer.__init__(self, ui, repo, matchfn, diffopts, buffered)
  1445         defaulttempl = {
       
  1446             'parent': '{rev}:{node|formatnode} ',
       
  1447             'manifest': '{rev}:{node|formatnode}',
       
  1448             'file_copy': '{name} ({source})',
       
  1449             'envvar': '{key}={value}',
       
  1450             'extra': '{key}={value|stringescape}'
       
  1451             }
       
  1452         # filecopy is preserved for compatibility reasons
       
  1453         defaulttempl['filecopy'] = defaulttempl['file_copy']
       
  1454         assert not (tmpl and mapfile)
  1445         assert not (tmpl and mapfile)
       
  1446         defaulttempl = templatekw.defaulttempl
  1455         if mapfile:
  1447         if mapfile:
  1456             self.t = templater.templater.frommapfile(mapfile,
  1448             self.t = templater.templater.frommapfile(mapfile,
  1457                                                      cache=defaulttempl)
  1449                                                      cache=defaulttempl)
  1458         else:
  1450         else:
  1459             self.t = formatter.maketemplater(ui, 'changeset', tmpl,
  1451             self.t = formatter.maketemplater(ui, 'changeset', tmpl,