Mercurial > hg
comparison hgext/convert/hg.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 | 06464d1ce6cd |
children | e45545f7895e |
comparison
equal
deleted
inserted
replaced
36606:4de15c54e59f | 36607:c6061cadb400 |
---|---|
34 node as nodemod, | 34 node as nodemod, |
35 phases, | 35 phases, |
36 scmutil, | 36 scmutil, |
37 util, | 37 util, |
38 ) | 38 ) |
39 from mercurial.utils import dateutil | |
39 stringio = util.stringio | 40 stringio = util.stringio |
40 | 41 |
41 from . import common | 42 from . import common |
42 mapfile = common.mapfile | 43 mapfile = common.mapfile |
43 NoRepo = common.NoRepo | 44 NoRepo = common.NoRepo |
581 parents = [p.hex() for p in _parents] | 582 parents = [p.hex() for p in _parents] |
582 optparents = [p.hex() for p in ctx.parents() if p and p not in _parents] | 583 optparents = [p.hex() for p in ctx.parents() if p and p not in _parents] |
583 crev = rev | 584 crev = rev |
584 | 585 |
585 return common.commit(author=ctx.user(), | 586 return common.commit(author=ctx.user(), |
586 date=util.datestr(ctx.date(), | 587 date=dateutil.datestr(ctx.date(), |
587 '%Y-%m-%d %H:%M:%S %1%2'), | 588 '%Y-%m-%d %H:%M:%S %1%2'), |
588 desc=ctx.description(), | 589 desc=ctx.description(), |
589 rev=crev, | 590 rev=crev, |
590 parents=parents, | 591 parents=parents, |
591 optparents=optparents, | 592 optparents=optparents, |