mercurial/changelog.py
changeset 36607 c6061cadb400
parent 36228 ddeb7653b31c
child 37084 f0b6fbea00cf
equal deleted inserted replaced
36606:4de15c54e59f 36607:c6061cadb400
    22     error,
    22     error,
    23     pycompat,
    23     pycompat,
    24     revlog,
    24     revlog,
    25     util,
    25     util,
    26 )
    26 )
       
    27 from .utils import dateutil
    27 
    28 
    28 _defaultextra = {'branch': 'default'}
    29 _defaultextra = {'branch': 'default'}
    29 
    30 
    30 def _string_escape(text):
    31 def _string_escape(text):
    31     """
    32     """
   522                                     % pycompat.bytestr(user))
   523                                     % pycompat.bytestr(user))
   523 
   524 
   524         desc = stripdesc(desc)
   525         desc = stripdesc(desc)
   525 
   526 
   526         if date:
   527         if date:
   527             parseddate = "%d %d" % util.parsedate(date)
   528             parseddate = "%d %d" % dateutil.parsedate(date)
   528         else:
   529         else:
   529             parseddate = "%d %d" % util.makedate()
   530             parseddate = "%d %d" % dateutil.makedate()
   530         if extra:
   531         if extra:
   531             branch = extra.get("branch")
   532             branch = extra.get("branch")
   532             if branch in ("default", ""):
   533             if branch in ("default", ""):
   533                 del extra["branch"]
   534                 del extra["branch"]
   534             elif branch in (".", "null", "tip"):
   535             elif branch in (".", "null", "tip"):