Mercurial > hg
comparison hgext/gpg.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 | f3d8f61c425d |
children | 2f7a3c90c0d7 |
comparison
equal
deleted
inserted
replaced
36606:4de15c54e59f | 36607:c6061cadb400 |
---|---|
19 node as hgnode, | 19 node as hgnode, |
20 pycompat, | 20 pycompat, |
21 registrar, | 21 registrar, |
22 util, | 22 util, |
23 ) | 23 ) |
24 from mercurial.utils import dateutil | |
24 | 25 |
25 cmdtable = {} | 26 cmdtable = {} |
26 command = registrar.command(cmdtable) | 27 command = registrar.command(cmdtable) |
27 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for | 28 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for |
28 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should | 29 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should |
256 sigver = "0" | 257 sigver = "0" |
257 sigmessage = "" | 258 sigmessage = "" |
258 | 259 |
259 date = opts.get('date') | 260 date = opts.get('date') |
260 if date: | 261 if date: |
261 opts['date'] = util.parsedate(date) | 262 opts['date'] = dateutil.parsedate(date) |
262 | 263 |
263 if revs: | 264 if revs: |
264 nodes = [repo.lookup(n) for n in revs] | 265 nodes = [repo.lookup(n) for n in revs] |
265 else: | 266 else: |
266 nodes = [node for node in repo.dirstate.parents() | 267 nodes = [node for node in repo.dirstate.parents() |