##// END OF EJS Templates
tests: fix py2.4 glob for devel warnings
tests: fix py2.4 glob for devel warnings

File last commit:

r24555:1b97cc5d default
r24555:1b97cc5d default
Show More
test-devel-warnings.t
67 lines | 1.9 KiB | text/troff | Tads3Lexer
/ tests / test-devel-warnings.t
Pierre-Yves David
devel: move the lock-checking code into core...
r24386
$ cat << EOF > buggylocking.py
> """A small extension that acquire locks in the wrong order
> """
>
> from mercurial import cmdutil
>
> cmdtable = {}
> command = cmdutil.command(cmdtable)
>
> @command('buggylocking', [], '')
> def buggylocking(ui, repo):
Pierre-Yves David
devel: also warn about transaction started without a lock...
r24388 > tr = repo.transaction('buggy')
Pierre-Yves David
devel: move the lock-checking code into core...
r24386 > lo = repo.lock()
> wl = repo.wlock()
Matt Mackall
tests: avoid deprecation warning
r24392 > wl.release()
> lo.release()
Pierre-Yves David
devel: move the lock-checking code into core...
r24386 > EOF
$ cat << EOF >> $HGRCPATH
> [extensions]
> buggylocking=$TESTTMP/buggylocking.py
> [devel]
> all=1
> EOF
$ hg init lock-checker
$ cd lock-checker
$ hg buggylocking
Pierre-Yves David
devel: also warn about transaction started without a lock...
r24388 transaction with no lock
Pierre-Yves David
devel: move the lock-checking code into core...
r24386 "lock" taken before "wlock"
$ cat << EOF >> $HGRCPATH
> [devel]
> all=0
> check-locks=1
> EOF
$ hg buggylocking
Pierre-Yves David
devel: also warn about transaction started without a lock...
r24388 transaction with no lock
Pierre-Yves David
devel: move the lock-checking code into core...
r24386 "lock" taken before "wlock"
$ hg buggylocking --traceback
Pierre-Yves David
devel: also warn about transaction started without a lock...
r24388 transaction with no lock
at:
Matt Mackall
tests: fix py2.4 glob for devel warnings
r24555 */hg:* in * (glob)
Pierre-Yves David
devel: also warn about transaction started without a lock...
r24388 */mercurial/dispatch.py:* in run (glob)
*/mercurial/dispatch.py:* in dispatch (glob)
*/mercurial/dispatch.py:* in _runcatch (glob)
*/mercurial/dispatch.py:* in _dispatch (glob)
*/mercurial/dispatch.py:* in runcommand (glob)
*/mercurial/dispatch.py:* in _runcommand (glob)
*/mercurial/dispatch.py:* in checkargs (glob)
*/mercurial/dispatch.py:* in <lambda> (glob)
*/mercurial/util.py:* in check (glob)
$TESTTMP/buggylocking.py:* in buggylocking (glob)
Pierre-Yves David
devel: move the lock-checking code into core...
r24386 "lock" taken before "wlock"
at:
Matt Mackall
tests: fix py2.4 glob for devel warnings
r24555 */hg:* in * (glob)
Pierre-Yves David
devel: move the lock-checking code into core...
r24386 */mercurial/dispatch.py:* in run (glob)
*/mercurial/dispatch.py:* in dispatch (glob)
*/mercurial/dispatch.py:* in _runcatch (glob)
*/mercurial/dispatch.py:* in _dispatch (glob)
*/mercurial/dispatch.py:* in runcommand (glob)
*/mercurial/dispatch.py:* in _runcommand (glob)
*/mercurial/dispatch.py:* in checkargs (glob)
*/mercurial/dispatch.py:* in <lambda> (glob)
*/mercurial/util.py:* in check (glob)
$TESTTMP/buggylocking.py:* in buggylocking (glob)
$ cd ..