hgext/convert/darcs.py
changeset 49867 668fb0dcb179
parent 49372 270f8e89ff32
equal deleted inserted replaced
49866:2ac60a71c240 49867:668fb0dcb179
   141         return self.parents[None]
   141         return self.parents[None]
   142 
   142 
   143     def getcommit(self, rev):
   143     def getcommit(self, rev):
   144         elt = self.changes[rev]
   144         elt = self.changes[rev]
   145         dateformat = b'%a %b %d %H:%M:%S %Z %Y'
   145         dateformat = b'%a %b %d %H:%M:%S %Z %Y'
   146         date = dateutil.strdate(elt.get('local_date'), dateformat)
   146         date = dateutil.strdate(self.recode(elt.get('local_date')), dateformat)
   147         desc = elt.findtext('name') + '\n' + elt.findtext('comment', '')
   147         desc = elt.findtext('name') + '\n' + elt.findtext('comment', '')
   148         # etree can return unicode objects for name, comment, and author,
   148         # etree can return unicode objects for name, comment, and author,
   149         # so recode() is used to ensure str objects are emitted.
   149         # so recode() is used to ensure str objects are emitted.
   150         newdateformat = b'%Y-%m-%d %H:%M:%S %1%2'
   150         newdateformat = b'%Y-%m-%d %H:%M:%S %1%2'
   151         return common.commit(
   151         return common.commit(