annotate mercurial/__main__.py @ 51137:eda075d7b2ac

cleanup: turn `wrapfunction` deprecation warning into an error We could simply drop the check, but lets raise explicit error instead of suffering strange error in case of misuse.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 08 Nov 2023 22:20:58 +0100
parents e7ef11b75fdc
children 1c5810ce737e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
50694
e7ef11b75fdc library: incorporate demandimport into runpy invocation
Jason R. Coombs <jaraco@jaraco.com>
parents: 50693
diff changeset
1 def run():
e7ef11b75fdc library: incorporate demandimport into runpy invocation
Jason R. Coombs <jaraco@jaraco.com>
parents: 50693
diff changeset
2 from . import demandimport
e7ef11b75fdc library: incorporate demandimport into runpy invocation
Jason R. Coombs <jaraco@jaraco.com>
parents: 50693
diff changeset
3
e7ef11b75fdc library: incorporate demandimport into runpy invocation
Jason R. Coombs <jaraco@jaraco.com>
parents: 50693
diff changeset
4 with demandimport.tracing.log('hg script'):
e7ef11b75fdc library: incorporate demandimport into runpy invocation
Jason R. Coombs <jaraco@jaraco.com>
parents: 50693
diff changeset
5 demandimport.enable()
e7ef11b75fdc library: incorporate demandimport into runpy invocation
Jason R. Coombs <jaraco@jaraco.com>
parents: 50693
diff changeset
6 from . import dispatch
e7ef11b75fdc library: incorporate demandimport into runpy invocation
Jason R. Coombs <jaraco@jaraco.com>
parents: 50693
diff changeset
7
e7ef11b75fdc library: incorporate demandimport into runpy invocation
Jason R. Coombs <jaraco@jaraco.com>
parents: 50693
diff changeset
8 dispatch.run()
e7ef11b75fdc library: incorporate demandimport into runpy invocation
Jason R. Coombs <jaraco@jaraco.com>
parents: 50693
diff changeset
9
e7ef11b75fdc library: incorporate demandimport into runpy invocation
Jason R. Coombs <jaraco@jaraco.com>
parents: 50693
diff changeset
10
50693
eb01d3a65ad8 library: enable runpy invocation on mercurial package
Jason R. Coombs <jaraco@jaraco.com>
parents:
diff changeset
11 if __name__ == '__main__':
50694
e7ef11b75fdc library: incorporate demandimport into runpy invocation
Jason R. Coombs <jaraco@jaraco.com>
parents: 50693
diff changeset
12 run()