Mercurial > hg
comparison hgext/journal.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 | 0fe7e39dc683 |
children | 2f7a3c90c0d7 |
comparison
equal
deleted
inserted
replaced
36606:4de15c54e59f | 36607:c6061cadb400 |
---|---|
33 node, | 33 node, |
34 pycompat, | 34 pycompat, |
35 registrar, | 35 registrar, |
36 util, | 36 util, |
37 ) | 37 ) |
38 from mercurial.utils import dateutil | |
38 | 39 |
39 cmdtable = {} | 40 cmdtable = {} |
40 command = registrar.command(cmdtable) | 41 command = registrar.command(cmdtable) |
41 | 42 |
42 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for | 43 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for |
324 oldhashes = [oldhashes] | 325 oldhashes = [oldhashes] |
325 if not isinstance(newhashes, list): | 326 if not isinstance(newhashes, list): |
326 newhashes = [newhashes] | 327 newhashes = [newhashes] |
327 | 328 |
328 entry = journalentry( | 329 entry = journalentry( |
329 util.makedate(), self.user, self.command, namespace, name, | 330 dateutil.makedate(), self.user, self.command, namespace, name, |
330 oldhashes, newhashes) | 331 oldhashes, newhashes) |
331 | 332 |
332 vfs = self.vfs | 333 vfs = self.vfs |
333 if self.sharedvfs is not None: | 334 if self.sharedvfs is not None: |
334 # write to the shared repository if this feature is being | 335 # write to the shared repository if this feature is being |