Mercurial > hg
view tests/test-devel-warnings.t @ 51977:42a116f1cdc1
branchmap-v3: introduce a "stop_rev" argument to `headsrevs`
The `headsrevs` method of the revlog already have a `revs` argument to compute
the headrevs of a limited set of heads. However, it disable the use of the
native compiled code to compute the heads, which slows down the branchmap v3
code a lot.
The branchmap v3 usage is actually quite constrained as we will always only
ignores a part at the top of the graph. So we could be significantly faster.
We start by making small change to the python side to improve the situation and
introduce the new API. More collaboration with the native code are coming later.
This massively speedup operation and close most of the remaining gaps between
branchmap-v3 and branchmap-v2. especially on repository with many revs like
mozilla-try. A small overhead remains mostly because the `headrevs` logic
currently has some inefficiently. We will look into them from there.
### benchmark.name = hg.command.unbundle
# bin-env-vars.hg.py-re2-module = default
# benchmark.variants.issue6528 = disabled
# benchmark.variants.resource-usage = default
# benchmark.variants.reuse-external-delta-parent = yes
# benchmark.variants.revs = any-1-extra-rev
# benchmark.variants.source = unbundle
# benchmark.variants.validate = default
# benchmark.variants.verbosity = quiet
## data-env-vars.name = netbeans-2018-08-01-zstd-sparse-revlog
# bin-env-vars.hg.flavor = default
branch-v2: 0.233711 ~~~~~
branch-v3 before: 0.368769 (+57.79%, +0.14)
branch-v3 after: 0.239857 (+2.63%, +0.01)
# bin-env-vars.hg.flavor = rust
branch-v2: 0.235230 ~~~~~
branch-v3 before: 0.372460 (+58.34%, +0.14)
branch-v3 after: 0.240972 (+2.44%, +0.01)
## data-env-vars.name = netbeans-2018-08-01-ds2-pnm
# bin-env-vars.hg.flavor = rust
branch-v2: 0.255586 ~~~~~
branch-v3 before: 0.318907 (+24.78%, +0.06)
branch-v3 after: 0.268560 (+5.08%, +0.01)
## data-env-vars.name = mozilla-central-2024-03-22-zstd-sparse-revlog
# bin-env-vars.hg.flavor = default
branch-v2: 0.339010 ~~~~~
branch-v3 before: 0.349752 (+3.17%, +0.01)
branch-v3 after: 0.349389 (+3.06%, +0.01)
# bin-env-vars.hg.flavor = rust
branch-v2: 0.346525 ~~~~~
branch-v3 before: 0.354300 (+2.24%, +0.01)
branch-v3 after: 0.355661 (+2.64%, +0.01)
## data-env-vars.name = mozilla-central-2024-03-22-ds2-pnm
# bin-env-vars.hg.flavor = rust
branch-v2: 0.380202 ~~~~~
branch-v3 before: 0.396293 (+4.23%, +0.02)
branch-v3 after: 0.408851 (+7.54%, +0.03)
## data-env-vars.name = mozilla-unified-2024-03-22-zstd-sparse-revlog
# bin-env-vars.hg.flavor = default
branch-v2: 0.412165 ~~~~~
branch-v3 before: 0.424769 (+3.06%, +0.01)
branch-v3 after: 0.427782 (+3.79%, +0.02)
# bin-env-vars.hg.flavor = rust
branch-v2: 0.412397 ~~~~~
branch-v3 before: 0.421796 (+2.28%, +0.01)
branch-v3 after: 0.422354 (+2.41%, +0.01)
## data-env-vars.name = mozilla-unified-2024-03-22-ds2-pnm
# bin-env-vars.hg.flavor = rust
branch-v2: 0.429501 ~~~~~
branch-v3 before: 0.443849 (+3.34%, +0.01)
branch-v3 after: 0.443197 (+3.19%, +0.01)
## data-env-vars.name = mozilla-try-2024-03-26-zstd-sparse-revlog
# bin-env-vars.hg.flavor = default
branch-v2: 3.403171 ~~~~~
branch-v3 before: 6.234055 (+83.18%, +2.83)
branch-v3 after: 3.819477 (+12.23%, +0.42)
# bin-env-vars.hg.flavor = rust
branch-v2: 3.454876 ~~~~~
branch-v3 before: 6.307813 (+82.58%, +2.85)
branch-v3 after: 3.590284 (+3.92%, +0.14)
## data-env-vars.name = mozilla-try-2024-03-26-ds2-pnm
# bin-env-vars.hg.flavor = rust
branch-v2: 3.465435 ~~~~~
branch-v3 before: 5.176076 (+49.36%, +1.71)
branch-v3 after: 3.633278 (+4.84%, +0.17)
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 03 Sep 2024 11:11:17 +0200 |
parents | 5d092194ac37 |
children |
line wrap: on
line source
$ cat << EOF > buggylocking.py > """A small extension that tests our developer warnings > """ > > from mercurial import error, registrar, repair, util > > cmdtable = {} > command = registrar.command(cmdtable) > > @command(b'buggylocking', [], '') > def buggylocking(ui, repo): > lo = repo.lock() > wl = repo.wlock() > wl.release() > lo.release() > > @command(b'buggytransaction', [], '') > def buggylocking(ui, repo): > tr = repo.transaction(b'buggy') > # make sure we rollback the transaction as we don't want to rely on the__del__ > tr.release() > > @command(b'properlocking', [], '') > def properlocking(ui, repo): > """check that reentrance is fine""" > wl = repo.wlock() > lo = repo.lock() > tr = repo.transaction(b'proper') > tr2 = repo.transaction(b'proper') > lo2 = repo.lock() > wl2 = repo.wlock() > wl2.release() > lo2.release() > tr2.close() > tr.close() > lo.release() > wl.release() > > @command(b'nowaitlocking', [], '') > def nowaitlocking(ui, repo): > lo = repo.lock() > wl = repo.wlock(wait=False) > wl.release() > lo.release() > > @command(b'no-wlock-write', [], '') > def nowlockwrite(ui, repo): > with repo.vfs(b'branch', b'a'): > pass > > @command(b'no-lock-write', [], '') > def nolockwrite(ui, repo): > with repo.svfs(b'fncache', b'a'): > pass > > @command(b'stripintr', [], '') > def stripintr(ui, repo): > lo = repo.lock() > tr = repo.transaction(b'foobar') > try: > repair.strip(repo.ui, repo, [repo[b'.'].node()]) > finally: > lo.release() > @command(b'oldanddeprecated', [], '') > def oldanddeprecated(ui, repo): > """test deprecation warning API""" > def foobar(ui): > ui.deprecwarn(b'foorbar is deprecated, go shopping', b'42.1337') > foobar(ui) > @command(b'nouiwarning', [], '') > def nouiwarning(ui, repo): > util.nouideprecwarn(b'this is a test', b'13.37') > @command(b'programmingerror', [], '') > def programmingerror(ui, repo): > raise error.ProgrammingError(b'something went wrong', hint=b'try again') > EOF $ cat << EOF >> $HGRCPATH > [extensions] > buggylocking=$TESTTMP/buggylocking.py > mock=$TESTDIR/mockblackbox.py > blackbox= > [devel] > all-warnings=1 > [blackbox] > track = command, commandexception, commandfinish, develwarn > EOF $ hg init lock-checker $ cd lock-checker $ hg buggylocking devel-warn: "wlock" acquired after "lock" at: $TESTTMP/buggylocking.py:* (buggylocking) (glob) $ cat << EOF >> $HGRCPATH > [devel] > all=0 > check-locks=1 > EOF $ hg buggylocking devel-warn: "wlock" acquired after "lock" at: $TESTTMP/buggylocking.py:* (buggylocking) (glob) #if no-chg no-pyoxidizer $ hg buggylocking --traceback devel-warn: "wlock" acquired after "lock" at: */hg:* in <module> (glob) (?) */mercurial/dispatch.py:* in run (glob) */mercurial/dispatch.py:* in dispatch (glob) */mercurial/dispatch.py:* in _rundispatch (glob) */mercurial/dispatch.py:* in _runcatch (glob) */mercurial/dispatch.py:* in _callcatch (glob) */mercurial/scmutil.py* in callcatch (glob) */mercurial/dispatch.py:* in _runcatchfunc (glob) */mercurial/dispatch.py:* in _dispatch (glob) */mercurial/dispatch.py:* in runcommand (glob) */mercurial/dispatch.py:* in _runcommand (glob) */mercurial/dispatch.py:* in <lambda> (glob) */mercurial/util.py:* in check (glob) $TESTTMP/buggylocking.py:* in buggylocking (glob) #endif #if chg no-pyoxidizer $ hg buggylocking --traceback devel-warn: "wlock" acquired after "lock" at: */hg:* in <module> (glob) (?) */mercurial/dispatch.py:* in run (glob) */mercurial/dispatch.py:* in dispatch (glob) */mercurial/dispatch.py:* in _rundispatch (glob) */mercurial/dispatch.py:* in _runcatch (glob) */mercurial/dispatch.py:* in _callcatch (glob) */mercurial/scmutil.py:* in callcatch (glob) */mercurial/dispatch.py:* in _runcatchfunc (glob) */mercurial/dispatch.py:* in _dispatch (glob) */mercurial/dispatch.py:* in runcommand (glob) */mercurial/dispatch.py:* in _runcommand (glob) */mercurial/dispatch.py:* in <lambda> (glob) */mercurial/util.py:* in check (glob) */mercurial/commands.py:* in serve (glob) */mercurial/server.py:* in runservice (glob) */mercurial/commandserver.py:* in run (glob) */mercurial/commandserver.py:* in _mainloop (glob) */mercurial/commandserver.py:* in _acceptnewconnection (glob) */mercurial/commandserver.py:* in _runworker (glob) */mercurial/commandserver.py:* in _serverequest (glob) */mercurial/commandserver.py:* in serve (glob) */mercurial/commandserver.py:* in serveone (glob) */mercurial/chgserver.py:* in runcommand (glob) */mercurial/commandserver.py:* in runcommand (glob) */mercurial/commandserver.py:* in _dispatchcommand (glob) */mercurial/dispatch.py:* in dispatch (glob) */mercurial/dispatch.py:* in _rundispatch (glob) */mercurial/dispatch.py:* in _runcatch (glob) */mercurial/dispatch.py:* in _callcatch (glob) */mercurial/scmutil.py:* in callcatch (glob) */mercurial/dispatch.py:* in _runcatchfunc (glob) */mercurial/dispatch.py:* in _dispatch (glob) */mercurial/dispatch.py:* in runcommand (glob) */mercurial/dispatch.py:* in _runcommand (glob) */mercurial/dispatch.py:* in <lambda> (glob) */mercurial/util.py:* in check (glob) $TESTTMP/buggylocking.py:* in buggylocking (glob) #endif #if pyoxidizer $ hg buggylocking --traceback devel-warn: "wlock" acquired after "lock" at: <string>:* (glob) mercurial.dispatch:* in run (glob) mercurial.dispatch:* in dispatch (glob) mercurial.dispatch:* in _rundispatch (glob) mercurial.dispatch:* in _runcatch (glob) mercurial.dispatch:* in _callcatch (glob) mercurial.scmutil:* in callcatch (glob) mercurial.dispatch:* in _runcatchfunc (glob) mercurial.dispatch:* in _dispatch (glob) mercurial.dispatch:* in runcommand (glob) mercurial.dispatch:* in _runcommand (glob) mercurial.dispatch:* in <lambda> (glob) mercurial.util:* in check (glob) $TESTTMP/buggylocking.py:* in buggylocking (glob) #endif $ hg properlocking $ hg nowaitlocking Writing without lock $ hg no-wlock-write devel-warn: write with no wlock: "branch" at: $TESTTMP/buggylocking.py:* (nowlockwrite) (glob) $ hg no-lock-write devel-warn: write with no lock: "fncache" at: $TESTTMP/buggylocking.py:* (nolockwrite) (glob) Stripping from a transaction $ echo a > a $ hg add a $ hg commit -m a $ hg stripintr 2>&1 | grep -E -v '^(\*\*| )' Traceback (most recent call last): *ProgrammingError: cannot strip from inside a transaction (glob) $ hg oldanddeprecated devel-warn: foorbar is deprecated, go shopping (compatibility will be dropped after Mercurial-42.1337, update your code.) at: $TESTTMP/buggylocking.py:* (oldanddeprecated) (glob) #if no-chg no-pyoxidizer $ hg oldanddeprecated --traceback devel-warn: foorbar is deprecated, go shopping (compatibility will be dropped after Mercurial-42.1337, update your code.) at: */hg:* in <module> (glob) (?) */mercurial/dispatch.py:* in run (glob) */mercurial/dispatch.py:* in dispatch (glob) */mercurial/dispatch.py:* in _rundispatch (glob) */mercurial/dispatch.py:* in _runcatch (glob) */mercurial/dispatch.py:* in _callcatch (glob) */mercurial/scmutil.py* in callcatch (glob) */mercurial/dispatch.py:* in _runcatchfunc (glob) */mercurial/dispatch.py:* in _dispatch (glob) */mercurial/dispatch.py:* in runcommand (glob) */mercurial/dispatch.py:* in _runcommand (glob) */mercurial/dispatch.py:* in <lambda> (glob) */mercurial/util.py:* in check (glob) $TESTTMP/buggylocking.py:* in oldanddeprecated (glob) #endif #if chg no-pyoxidizer $ hg oldanddeprecated --traceback devel-warn: foorbar is deprecated, go shopping (compatibility will be dropped after Mercurial-42.1337, update your code.) at: */hg:* in <module> (glob) */mercurial/dispatch.py:* in run (glob) */mercurial/dispatch.py:* in dispatch (glob) */mercurial/dispatch.py:* in _rundispatch (glob) */mercurial/dispatch.py:* in _runcatch (glob) */mercurial/dispatch.py:* in _callcatch (glob) */mercurial/scmutil.py:* in callcatch (glob) */mercurial/dispatch.py:* in _runcatchfunc (glob) */mercurial/dispatch.py:* in _dispatch (glob) */mercurial/dispatch.py:* in runcommand (glob) */mercurial/dispatch.py:* in _runcommand (glob) */mercurial/dispatch.py:* in <lambda> (glob) */mercurial/util.py:* in check (glob) */mercurial/commands.py:* in serve (glob) */mercurial/server.py:* in runservice (glob) */mercurial/commandserver.py:* in run (glob) */mercurial/commandserver.py:* in _mainloop (glob) */mercurial/commandserver.py:* in _acceptnewconnection (glob) */mercurial/commandserver.py:* in _runworker (glob) */mercurial/commandserver.py:* in _serverequest (glob) */mercurial/commandserver.py:* in serve (glob) */mercurial/commandserver.py:* in serveone (glob) */mercurial/chgserver.py:* in runcommand (glob) */mercurial/commandserver.py:* in runcommand (glob) */mercurial/commandserver.py:* in _dispatchcommand (glob) */mercurial/dispatch.py:* in dispatch (glob) */mercurial/dispatch.py:* in _rundispatch (glob) */mercurial/dispatch.py:* in _runcatch (glob) */mercurial/dispatch.py:* in _callcatch (glob) */mercurial/scmutil.py:* in callcatch (glob) */mercurial/dispatch.py:* in _runcatchfunc (glob) */mercurial/dispatch.py:* in _dispatch (glob) */mercurial/dispatch.py:* in runcommand (glob) */mercurial/dispatch.py:* in _runcommand (glob) */mercurial/dispatch.py:* in <lambda> (glob) */mercurial/util.py:* in check (glob) $TESTTMP/buggylocking.py:* in oldanddeprecated (glob) #endif #if pyoxidizer $ hg oldanddeprecated --traceback devel-warn: foorbar is deprecated, go shopping (compatibility will be dropped after Mercurial-42.1337, update your code.) at: <string>:* (glob) mercurial.dispatch:* in run (glob) mercurial.dispatch:* in dispatch (glob) mercurial.dispatch:* in _rundispatch (glob) mercurial.dispatch:* in _runcatch (glob) mercurial.dispatch:* in _callcatch (glob) mercurial.scmutil:* in callcatch (glob) mercurial.dispatch:* in _runcatchfunc (glob) mercurial.dispatch:* in _dispatch (glob) mercurial.dispatch:* in runcommand (glob) mercurial.dispatch:* in _runcommand (glob) mercurial.dispatch:* in <lambda> (glob) mercurial.util:* in check (glob) $TESTTMP/buggylocking.py:* in oldanddeprecated (glob) #endif #if no-chg no-pyoxidizer $ hg blackbox -l 7 1970-01-01 00:00:00.000 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> oldanddeprecated 1970-01-01 00:00:00.000 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> devel-warn: foorbar is deprecated, go shopping (compatibility will be dropped after Mercurial-42.1337, update your code.) at: $TESTTMP/buggylocking.py:* (oldanddeprecated) (glob) 1970-01-01 00:00:00.000 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> oldanddeprecated exited 0 after * seconds (glob) 1970-01-01 00:00:00.000 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> oldanddeprecated --traceback 1970-01-01 00:00:00.000 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> devel-warn: foorbar is deprecated, go shopping (compatibility will be dropped after Mercurial-42.1337, update your code.) at: */hg:* in <module> (glob) (?) */mercurial/dispatch.py:* in run (glob) */mercurial/dispatch.py:* in dispatch (glob) */mercurial/dispatch.py:* in _rundispatch (glob) */mercurial/dispatch.py:* in _runcatch (glob) */mercurial/dispatch.py:* in _callcatch (glob) */mercurial/scmutil.py* in callcatch (glob) */mercurial/dispatch.py:* in _runcatchfunc (glob) */mercurial/dispatch.py:* in _dispatch (glob) */mercurial/dispatch.py:* in runcommand (glob) */mercurial/dispatch.py:* in _runcommand (glob) */mercurial/dispatch.py:* in <lambda> (glob) */mercurial/util.py:* in check (glob) $TESTTMP/buggylocking.py:* in oldanddeprecated (glob) 1970-01-01 00:00:00.000 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> oldanddeprecated --traceback exited 0 after * seconds (glob) 1970-01-01 00:00:00.000 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> blackbox -l 7 #endif #if chg no-pyoxidizer $ hg blackbox -l 7 1970-01-01 00:00:00.000 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> oldanddeprecated 1970-01-01 00:00:00.000 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> devel-warn: foorbar is deprecated, go shopping (compatibility will be dropped after Mercurial-42.1337, update your code.) at: $TESTTMP/buggylocking.py:* (oldanddeprecated) (glob) 1970-01-01 00:00:00.000 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> oldanddeprecated exited 0 after * seconds (glob) 1970-01-01 00:00:00.000 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> oldanddeprecated --traceback 1970-01-01 00:00:00.000 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> devel-warn: foorbar is deprecated, go shopping (compatibility will be dropped after Mercurial-42.1337, update your code.) at: */hg:* in <module> (glob) */mercurial/dispatch.py:* in run (glob) */mercurial/dispatch.py:* in dispatch (glob) */mercurial/dispatch.py:* in _rundispatch (glob) */mercurial/dispatch.py:* in _runcatch (glob) */mercurial/dispatch.py:* in _callcatch (glob) */mercurial/scmutil.py:* in callcatch (glob) */mercurial/dispatch.py:* in _runcatchfunc (glob) */mercurial/dispatch.py:* in _dispatch (glob) */mercurial/dispatch.py:* in runcommand (glob) */mercurial/dispatch.py:* in _runcommand (glob) */mercurial/dispatch.py:* in <lambda> (glob) */mercurial/util.py:* in check (glob) */mercurial/commands.py:* in serve (glob) */mercurial/server.py:* in runservice (glob) */mercurial/commandserver.py:* in run (glob) */mercurial/commandserver.py:* in _mainloop (glob) */mercurial/commandserver.py:* in _acceptnewconnection (glob) */mercurial/commandserver.py:* in _runworker (glob) */mercurial/commandserver.py:* in _serverequest (glob) */mercurial/commandserver.py:* in serve (glob) */mercurial/commandserver.py:* in serveone (glob) */mercurial/chgserver.py:* in runcommand (glob) */mercurial/commandserver.py:* in runcommand (glob) */mercurial/commandserver.py:* in _dispatchcommand (glob) */mercurial/dispatch.py:* in dispatch (glob) */mercurial/dispatch.py:* in _rundispatch (glob) */mercurial/dispatch.py:* in _runcatch (glob) */mercurial/dispatch.py:* in _callcatch (glob) */mercurial/scmutil.py:* in callcatch (glob) */mercurial/dispatch.py:* in _runcatchfunc (glob) */mercurial/dispatch.py:* in _dispatch (glob) */mercurial/dispatch.py:* in runcommand (glob) */mercurial/dispatch.py:* in _runcommand (glob) */mercurial/dispatch.py:* in <lambda> (glob) */mercurial/util.py:* in check (glob) $TESTTMP/buggylocking.py:* in oldanddeprecated (glob) 1970-01-01 00:00:00.000 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> oldanddeprecated --traceback exited 0 after * seconds (glob) 1970-01-01 00:00:00.000 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> blackbox -l 7 #endif #if pyoxidizer $ hg blackbox -l 7 1970-01-01 00:00:00.000 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> oldanddeprecated 1970-01-01 00:00:00.000 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> devel-warn: foorbar is deprecated, go shopping (compatibility will be dropped after Mercurial-42.1337, update your code.) at: $TESTTMP/buggylocking.py:* (oldanddeprecated) (glob) 1970-01-01 00:00:00.000 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> oldanddeprecated exited 0 after * seconds (glob) 1970-01-01 00:00:00.000 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> oldanddeprecated --traceback 1970-01-01 00:00:00.000 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> devel-warn: foorbar is deprecated, go shopping (compatibility will be dropped after Mercurial-42.1337, update your code.) at: <string>:* in <module> (glob) mercurial.dispatch:* in run (glob) mercurial.dispatch:* in dispatch (glob) mercurial.dispatch:* in _rundispatch (glob) mercurial.dispatch:* in _runcatch (glob) mercurial.dispatch:* in _callcatch (glob) mercurial.scmutil* in callcatch (glob) mercurial.dispatch:* in _runcatchfunc (glob) mercurial.dispatch:* in _dispatch (glob) mercurial.dispatch:* in runcommand (glob) mercurial.dispatch:* in _runcommand (glob) mercurial.dispatch:* in <lambda> (glob) mercurial.util:* in check (glob) $TESTTMP/buggylocking.py:* in oldanddeprecated (glob) 1970-01-01 00:00:00.000 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> oldanddeprecated --traceback exited 0 after * seconds (glob) 1970-01-01 00:00:00.000 bob @cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b (5000)> blackbox -l 7 #endif Test programming error failure: $ hg buggytransaction 2>&1 | grep -E -v '^ ' ** Unknown exception encountered with possibly-broken third-party extension "buggylocking" (version N/A) ** which supports versions unknown of Mercurial. ** Please disable "buggylocking" and try your action again. ** If that fixes the bug please report it to the extension author. ** Python * (glob) ** Mercurial Distributed SCM (*) (glob) ** Extensions loaded: * (glob) ** ProgrammingError: transaction requires locking Traceback (most recent call last): *ProgrammingError: transaction requires locking (glob) $ hg programmingerror 2>&1 | grep -E -v '^ ' ** Unknown exception encountered with possibly-broken third-party extension "buggylocking" (version N/A) ** which supports versions unknown of Mercurial. ** Please disable "buggylocking" and try your action again. ** If that fixes the bug please report it to the extension author. ** Python * (glob) ** Mercurial Distributed SCM (*) (glob) ** Extensions loaded: * (glob) ** ProgrammingError: something went wrong ** (try again) Traceback (most recent call last): *ProgrammingError: something went wrong (glob) Old style deprecation warning $ hg nouiwarning $TESTTMP/buggylocking.py:*: DeprecationWarning: this is a test (glob) (compatibility will be dropped after Mercurial-13.37, update your code.) util.nouideprecwarn(b'this is a test', b'13.37') (disabled outside of test run) $ HGEMITWARNINGS= hg nouiwarning Test warning on config option access and registration $ cat << EOF > ${TESTTMP}/buggyconfig.py > """A small extension that tests our developer warnings for config""" > > from mercurial import configitems, registrar > > cmdtable = {} > command = registrar.command(cmdtable) > > configtable = {} > configitem = registrar.configitem(configtable) > > configitem(b'test', b'some', default=b'foo') > configitem(b'test', b'dynamic', default=configitems.dynamicdefault) > configitem(b'test', b'callable', default=list) > # overwrite a core config > configitem(b'ui', b'quiet', default=False) > configitem(b'ui', b'interactive', default=None) > > @command(b'buggyconfig') > def cmdbuggyconfig(ui, repo): > repo.ui.config(b'ui', b'quiet', True) > repo.ui.config(b'ui', b'interactive', False) > repo.ui.config(b'test', b'some', b'bar') > repo.ui.config(b'test', b'some', b'foo') > repo.ui.config(b'test', b'dynamic', b'some-required-default') > repo.ui.config(b'test', b'dynamic') > repo.ui.config(b'test', b'callable', []) > repo.ui.config(b'test', b'callable', b'foo') > repo.ui.config(b'test', b'unregistered') > repo.ui.config(b'unregistered', b'unregistered') > EOF $ hg --config "extensions.buggyconfig=${TESTTMP}/buggyconfig.py" buggyconfig devel-warn: extension 'buggyconfig' overwrites config item 'ui.interactive' at: */mercurial/extensions.py:* (_loadextra) (glob) (no-pyoxidizer !) devel-warn: extension 'buggyconfig' overwrites config item 'ui.quiet' at: */mercurial/extensions.py:* (_loadextra) (glob) (no-pyoxidizer !) devel-warn: extension 'buggyconfig' overwrites config item 'ui.interactive' at: mercurial.extensions:* (_loadextra) (glob) (pyoxidizer !) devel-warn: extension 'buggyconfig' overwrites config item 'ui.quiet' at: mercurial.extensions:* (_loadextra) (glob) (pyoxidizer !) devel-warn: specifying a mismatched default value for a registered config item: 'ui.quiet' 'True' at: $TESTTMP/buggyconfig.py:* (cmdbuggyconfig) (glob) devel-warn: specifying a mismatched default value for a registered config item: 'ui.interactive' 'False' at: $TESTTMP/buggyconfig.py:* (cmdbuggyconfig) (glob) devel-warn: specifying a mismatched default value for a registered config item: 'test.some' 'bar' at: $TESTTMP/buggyconfig.py:* (cmdbuggyconfig) (glob) devel-warn: config item requires an explicit default value: 'test.dynamic' at: $TESTTMP/buggyconfig.py:* (cmdbuggyconfig) (glob) devel-warn: specifying a mismatched default value for a registered config item: 'test.callable' 'foo' at: $TESTTMP/buggyconfig.py:* (cmdbuggyconfig) (glob) devel-warn: accessing unregistered config item: 'test.unregistered' at: $TESTTMP/buggyconfig.py:* (cmdbuggyconfig) (glob) devel-warn: accessing unregistered config item: 'unregistered.unregistered' at: $TESTTMP/buggyconfig.py:* (cmdbuggyconfig) (glob) $ cd ..