mercurial/__main__.py
author Mads Kiilerich <mads@kiilerich.com>
Tue, 27 Jun 2023 13:51:50 +0200
branchstable
changeset 50749 faccec1edc2c
parent 50694 e7ef11b75fdc
child 51860 1c5810ce737e
permissions -rw-r--r--
utils: stop using datetime.utcfromtimestamp() deprecated in Python 3.12 Python3.12 made tests fail with warnings: DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.fromtimestamp(timestamp, datetime.UTC). Computing the diff while in timestamp seconds seems to preserve to the original intent from ae04af1ce78d. It would be nice to have some doctest coverage of this, with the problematic corner cases that has popped up over time...

def run():
    from . import demandimport

    with demandimport.tracing.log('hg script'):
        demandimport.enable()
        from . import dispatch

        dispatch.run()


if __name__ == '__main__':
    run()