Mercurial > public > mercurial-scm > hg-stable
diff hgext/shelve.py @ 36636: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 | 7af7443877da |
children | ffa3026d4196 |
line wrap: on
line diff
--- a/hgext/shelve.py Thu Feb 08 23:27:24 2018 +0530 +++ b/hgext/shelve.py Thu Feb 15 17:18:26 2018 +0100 @@ -55,6 +55,7 @@ from . import ( rebase, ) +from mercurial.utils import dateutil cmdtable = {} command = registrar.command(cmdtable) @@ -563,7 +564,8 @@ continue ui.write(' ' * (16 - len(sname))) used = 16 - age = '(%s)' % templatefilters.age(util.makedate(mtime), abbrev=True) + date = dateutil.makedate(mtime) + age = '(%s)' % templatefilters.age(date, abbrev=True) ui.write(age, label='shelve.age') ui.write(' ' * (12 - len(age))) used += 12