Mercurial > public > mercurial-scm > hg
diff hgext/convert/monotone.py @ 36607:c6061cadb400
util: extract all date-related utils in utils/dateutil module
With this commit, util.py lose 262 lines
Note for extensions author, if this commit breaks your extension, you can pull
the step-by-step split here to help you more easily pinpoint the renaming that
broke your extension:
hg pull https://bitbucket.org/octobus/mercurial-devel/ -r ac1f6453010d
Differential Revision: https://phab.mercurial-scm.org/D2282
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Thu, 15 Feb 2018 17:18:26 +0100 |
parents | 4bc983568016 |
children | 2aa12d7fcb4f |
line wrap: on
line diff
--- a/hgext/convert/monotone.py Thu Feb 08 23:27:24 2018 +0530 +++ b/hgext/convert/monotone.py Thu Feb 15 17:18:26 2018 +0100 @@ -14,8 +14,8 @@ from mercurial import ( error, pycompat, - util, ) +from mercurial.utils import dateutil from . import common @@ -310,9 +310,10 @@ certs = self.mtngetcerts(rev) if certs.get('suspend') == certs["branch"]: extra['close'] = 1 + dateformat = "%Y-%m-%dT%H:%M:%S" return common.commit( author=certs["author"], - date=util.datestr(util.strdate(certs["date"], "%Y-%m-%dT%H:%M:%S")), + date=dateutil.datestr(dateutil.strdate(certs["date"], dateformat)), desc=certs["changelog"], rev=rev, parents=self.mtnrun("parents", rev).splitlines(),