comparison contrib/synthrepo.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 238646784294
children 6540333acb95
comparison
equal deleted inserted replaced
36606:4de15c54e59f 36607:c6061cadb400
57 error, 57 error,
58 hg, 58 hg,
59 patch, 59 patch,
60 registrar, 60 registrar,
61 scmutil, 61 scmutil,
62 util,
63 ) 62 )
63 from mercurial.utils import dateutil
64 64
65 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for 65 # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for
66 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should 66 # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should
67 # be specifying the version(s) of Mercurial they are tested with, or 67 # be specifying the version(s) of Mercurial they are tested with, or
68 # leave the attribute unspecified. 68 # leave the attribute unspecified.
380 380
381 ui.progress(_synthesizing, None) 381 ui.progress(_synthesizing, None)
382 message = 'synthesized wide repo with %d files' % (len(files),) 382 message = 'synthesized wide repo with %d files' % (len(files),)
383 mc = context.memctx(repo, [pctx.node(), nullid], message, 383 mc = context.memctx(repo, [pctx.node(), nullid], message,
384 files, filectxfn, ui.username(), 384 files, filectxfn, ui.username(),
385 '%d %d' % util.makedate()) 385 '%d %d' % dateutil.makedate())
386 initnode = mc.commit() 386 initnode = mc.commit()
387 if ui.debugflag: 387 if ui.debugflag:
388 hexfn = hex 388 hexfn = hex
389 else: 389 else:
390 hexfn = short 390 hexfn = short