[PATCH] devel-warn: issue a warning when writing bookmarks without holding a lock

Gregory Szorc gregory.szorc at gmail.com
Sat Aug 1 19:53:02 UTC 2015


Nice!

I wonder if we could add something to the VFS layer that issues devel
warnings when all but a whitelist of files are written without a lock
and/or transaction, as pretty much all write I/O should be guarded somehow.

On Sat, Aug 1, 2015 at 6:30 AM, Laurent Charignon <lcharignon at fb.com> wrote:

> # HG changeset patch
> # User Laurent Charignon <lcharignon at fb.com>
> # Date 1438433019 25200
> #      Sat Aug 01 05:43:39 2015 -0700
> # Branch stable
> # Node ID 1a54d2ef87e4e730183ea00d9b7bccbd4e12acb9
> # Parent  511e1949d55708e7eeacc8ab7874df534422e4c6
> devel-warn: issue a warning when writing bookmarks without holding a lock
>
> I saw an issue in an extension that we develop where we were writing
> bookmarks
> without holding a lock. Another extension was taking a lock at the same
> time and
> wiped out the bookmarks we were about to write. As this example shows, it
> is
> risky to write bookmarks without holding a lock. This patch adds a
> devel-warning
> to urge people to fix their bug-prone code. Unfortunately is breaks 44 of
> our
> tests and we will have to fix them.
> I am taking a naive approach by just checking that the lock is held when we
> write bookmarks but it is as bad to modify the bookmarks without holding a
> lock
> and adding checks there or when we take a lock in general will give us most
> certainly an even greater number of potential issues.
>
> diff --git a/mercurial/bookmarks.py b/mercurial/bookmarks.py
> --- a/mercurial/bookmarks.py
> +++ b/mercurial/bookmarks.py
> @@ -79,6 +79,9 @@
>          can be copied back on rollback.
>          '''
>          repo = self._repo
> +        l = repo._lockref and repo._lockref()
> +        if l is None or not l.held:
> +            repo.ui.develwarn('bookmarks write with no lock')
>          self._writerepo(repo)
>          repo.invalidatevolatilesets()
>
> diff --git a/tests/test-bookmarks-current.t
> b/tests/test-bookmarks-current.t
> --- a/tests/test-bookmarks-current.t
> +++ b/tests/test-bookmarks-current.t
> @@ -62,6 +62,7 @@
>    $ echo 'b' > b
>    $ hg add b
>    $ hg commit -m'test'
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>
>  list bookmarks
>
> @@ -163,6 +164,7 @@
>       Z                         0:719295282060
>    $ hg update
>    1 files updated, 0 files merged, 0 files removed, 0 files unresolved
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>    updating bookmark X
>    $ hg bookmarks
>     * X                         2:49e1c4e84c58
> @@ -173,6 +175,7 @@
>
>    $ echo a >> b
>    $ hg ci -m.
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>    $ hg up -q X
>    $ test -f .hg/bookmarks.current
>
> diff --git a/tests/test-bookmarks-merge.t b/tests/test-bookmarks-merge.t
> --- a/tests/test-bookmarks-merge.t
> +++ b/tests/test-bookmarks-merge.t
> @@ -26,6 +26,7 @@
>    1 files updated, 0 files merged, 0 files removed, 0 files unresolved
>    (branch merge, don't forget to commit)
>    $ hg commit -m'merge'
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>    $ hg bookmarks
>       b                         1:d2ae7f538514
>     * c                         3:b8f96cf4688b
> @@ -110,6 +111,7 @@
>    1 files updated, 0 files merged, 0 files removed, 0 files unresolved
>    (branch merge, don't forget to commit)
>    $ hg commit -m'merge'
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>    $ hg bookmarks
>       b                         1:d2ae7f538514
>       c                         3:b8f96cf4688b
> diff --git a/tests/test-bookmarks-pushpull.t
> b/tests/test-bookmarks-pushpull.t
> --- a/tests/test-bookmarks-pushpull.t
> +++ b/tests/test-bookmarks-pushpull.t
> @@ -122,6 +122,7 @@
>    $ echo c1 > f1
>    $ hg ci -Am1
>    adding f1
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>    $ hg book -f @
>    $ hg book -f X
>    $ hg book
> @@ -133,10 +134,12 @@
>    $ cd ../b
>    $ hg up
>    1 files updated, 0 files merged, 0 files removed, 0 files unresolved
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>    updating bookmark foobar
>    $ echo c2 > f2
>    $ hg ci -Am2
>    adding f2
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>    $ hg book -if @
>    $ hg book -if X
>    $ hg book
> @@ -244,6 +247,7 @@
>    $ echo c3 > f2
>    $ hg ci -Am3
>    adding f2
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>    created new head
>    $ hg push ../a
>    pushing to ../a
> @@ -275,6 +279,7 @@
>    $ hg up -q Y
>    $ echo c4 > f2
>    $ hg ci -Am4
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>    $ echo c5 > f3
>    $ cat <<EOF > .hg/hgrc
>    > [hooks]
> @@ -641,9 +646,11 @@
>    $ echo foo > foo
>    $ hg add foo
>    $ hg commit -m 'add foo'
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>    $ echo bar > bar
>    $ hg add bar
>    $ hg commit -m 'add bar'
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>    $ hg co "tip^"
>    0 files updated, 0 files merged, 1 files removed, 0 files unresolved
>    (leaving bookmark @)
> @@ -666,6 +673,7 @@
>    $ hg book W
>    $ echo c5 > f2
>    $ hg ci -Am5
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>    created new head
>    $ hg push -B W
>    pushing to http://localhost:$HGPORT/
> diff --git a/tests/test-bookmarks-strip.t b/tests/test-bookmarks-strip.t
> --- a/tests/test-bookmarks-strip.t
> +++ b/tests/test-bookmarks-strip.t
> @@ -29,6 +29,7 @@
>  commit second revision
>
>    $ hg ci -m 2
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>
>  set bookmark
>
> diff --git a/tests/test-bookmarks.t b/tests/test-bookmarks.t
> --- a/tests/test-bookmarks.t
> +++ b/tests/test-bookmarks.t
> @@ -27,6 +27,7 @@
>    $ echo a > a
>    $ hg add a
>    $ hg commit -m 0
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>
>  bookmark X moved to rev 0
>
> @@ -62,6 +63,7 @@
>    $ echo b > b
>    $ hg add b
>    $ hg commit -m 1
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>
>    $ hg bookmarks -Tjson
>    [
> @@ -161,6 +163,7 @@
>    $ echo c > c
>    $ hg add c
>    $ hg commit -m 2
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>    created new head
>
>  bookmarks X moved to rev 2, Y at rev -1, Z at rev 0
> @@ -406,6 +409,7 @@
>    $ hg bookmark tmp-rollback
>    $ hg ci -Amr
>    adding f1
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>    $ hg bookmarks
>       X2                        1:925d80f479bb
>       Y                         2:db815d6d32e6
> @@ -558,6 +562,7 @@
>    phases: 5 draft
>    $ hg update
>    1 files updated, 0 files merged, 0 files removed, 0 files unresolved
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>    updating bookmark Z
>    $ hg bookmarks
>       X2                        1:925d80f479bb
> diff --git a/tests/test-clone.t b/tests/test-clone.t
> --- a/tests/test-clone.t
> +++ b/tests/test-clone.t
> @@ -710,6 +710,7 @@
>    $ hg bookmark bookA
>    $ echo 1a > foo
>    $ hg commit -m 1a
> +  devel-warn: bookmarks write with no lock at: */hgext/share.py:171
> (write) (glob)
>    $ cd ../source1b
>    $ hg -q up -r 0
>    $ echo head1 > foo
> diff --git a/tests/test-commandserver.t b/tests/test-commandserver.t
> --- a/tests/test-commandserver.t
> +++ b/tests/test-commandserver.t
> @@ -280,6 +280,7 @@
>       bm2                       1:d3a0a68be6de
>    *** runcommand bookmarks bm3
>    *** runcommand commit -Amm
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>    *** runcommand bookmarks
>       bm1                       1:d3a0a68be6de
>       bm2                       1:d3a0a68be6de
> @@ -324,6 +325,7 @@
>    no phases changed
>     [1]
>    *** runcommand commit -Am.
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>    *** runcommand rollback
>    repository tip rolled back to revision 3 (undo commit)
>    working directory now based on revision 3
> @@ -364,6 +366,7 @@
>    ...     runcommand(server, ['status', '-i', '-u'])
>    *** runcommand commit -Am.
>    adding .hgignore
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>    *** runcommand status -i -u
>    I ignored-file
>
> diff --git a/tests/test-commit-amend.t b/tests/test-commit-amend.t
> --- a/tests/test-commit-amend.t
> +++ b/tests/test-commit-amend.t
> @@ -371,6 +371,7 @@
>    (branches are permanent and global, did you want a bookmark?)
>    $ echo a >> a
>    $ hg ci -m 'branch foo'
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>    $ hg branch default -f
>    marked working directory as branch default
>    $ hg ci --amend -m 'back to default'
> diff --git a/tests/test-commit.t b/tests/test-commit.t
> --- a/tests/test-commit.t
> +++ b/tests/test-commit.t
> @@ -304,6 +304,7 @@
>    $ echo removed > removed
>    $ hg book activebookmark
>    $ hg ci -qAm init
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>
>    $ hg rm removed
>    $ echo changed >> changed
> diff --git a/tests/test-completion.t b/tests/test-completion.t
> --- a/tests/test-completion.t
> +++ b/tests/test-completion.t
> @@ -302,11 +302,14 @@
>    $ hg bookmark fo
>    $ hg branch -q fie
>    $ hg ci -q -Amfie
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>    $ echo fo > fo
>    $ hg branch -qf default
>    $ hg ci -q -Amfo
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>    $ echo Fum > Fum
>    $ hg ci -q -AmFum
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>    $ hg bookmark Fum
>
>  Test debugpathcomplete
> diff --git a/tests/test-convert-hg-source.t
> b/tests/test-convert-hg-source.t
> --- a/tests/test-convert-hg-source.t
> +++ b/tests/test-convert-hg-source.t
> @@ -28,6 +28,7 @@
>    1 files updated, 1 files merged, 0 files removed, 0 files unresolved
>    (branch merge, don't forget to commit)
>    $ hg ci -m 'merge local copy' -d '3 0'
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>    $ hg up -C 1
>    1 files updated, 0 files merged, 1 files removed, 0 files unresolved
>    (leaving bookmark premerge1)
> @@ -37,6 +38,7 @@
>    1 files updated, 1 files merged, 0 files removed, 0 files unresolved
>    (branch merge, don't forget to commit)
>    $ hg ci -m 'merge remote copy' -d '4 0'
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>    created new head
>
>  Make and delete some tags
> @@ -51,6 +53,7 @@
>    $ echo some other change to make sure we get a rev 5 > baz
>  #endif
>    $ hg ci -m 'mark baz executable' -d '5 0'
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>    $ cd ..
>    $ hg convert --datesort orig new 2>&1 | grep -v 'subversion python
> bindings could not be loaded'
>    initializing destination new repository
> diff --git a/tests/test-devel-warnings.t b/tests/test-devel-warnings.t
> --- a/tests/test-devel-warnings.t
> +++ b/tests/test-devel-warnings.t
> @@ -47,6 +47,9 @@
>    >         repair.strip(repo.ui, repo, [repo['.'].node()])
>    >     finally:
>    >         lo.release()
> +  > @command('bookmarkwithnolock', [], '')
> +  > def bookmarkwithnolock(ui, repo):
> +  >     repo._bookmarks.write()
>    >
>    > def oldstylerevset(repo, subset, x):
>    >     return list(subset)
> @@ -115,4 +118,7 @@
>    devel-warn: revset "oldstyle" use list instead of smartset, (upgrade
> your code) at: */mercurial/revset.py:* (mfunc) (glob)
>    0
>
> +  $ hg bookmarkwithnolock
> +  devel-warn: bookmarks write with no lock at:
> $TESTTMP/buggylocking.py:50 (bookmarkwithnolock)
> +
>    $ cd ..
> diff --git a/tests/test-extra-filelog-entry.t
> b/tests/test-extra-filelog-entry.t
> --- a/tests/test-extra-filelog-entry.t
> +++ b/tests/test-extra-filelog-entry.t
> @@ -14,6 +14,7 @@
>    $ hg qnew -f foo.diff
>    $ echo b > b
>    $ hg qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>    $ hg debugindex b
>       rev    offset  length  ..... linkrev nodeid       p1           p2
> (re)
> diff --git a/tests/test-hgweb-commands.t b/tests/test-hgweb-commands.t
> --- a/tests/test-hgweb-commands.t
> +++ b/tests/test-hgweb-commands.t
> @@ -24,10 +24,12 @@
>    marked working directory as branch stable
>    (branches are permanent and global, did you want a bookmark?)
>    $ hg ci -Ambranch
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>    $ hg branch unstable
>    marked working directory as branch unstable
>    >>> open('msg', 'wb').write('branch commit with null character: \0\n')
>    $ hg ci -l msg
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>    $ rm msg
>
>    $ cat > .hg/hgrc <<EOF
> @@ -2063,6 +2065,7 @@
>
>    $ echo foo >> foo
>    $ HGENCODING=cp932 hg ci -m `$PYTHON -c 'print("\x94\x5c")'`
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>
>  Graph json escape of multibyte character
>
> diff --git a/tests/test-issue1877.t b/tests/test-issue1877.t
> --- a/tests/test-issue1877.t
> +++ b/tests/test-issue1877.t
> @@ -15,6 +15,7 @@
>    $ echo c > c
>    $ hg add c
>    $ hg ci -m'c'
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>    created new head
>    $ hg book
>     * main                      2:d36c0562f908
> diff --git a/tests/test-mq-eol.t b/tests/test-mq-eol.t
> --- a/tests/test-mq-eol.t
> +++ b/tests/test-mq-eol.t
> @@ -85,6 +85,7 @@
>    applying eol.diff
>    now at: eol.diff
>    $ hg qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    $ python ../cateol.py .hg/patches/eol.diff
>    # HG changeset patch<LF>
>    # Parent  0d0bf99a8b7a3842c6f8ef09e34f69156c4bd9d0<LF>
> diff --git a/tests/test-mq-git.t b/tests/test-mq-git.t
> --- a/tests/test-mq-git.t
> +++ b/tests/test-mq-git.t
> @@ -63,6 +63,7 @@
>  git=auto: regular patch after qrefresh without --git:
>
>    $ hg qrefresh -d '0 0'
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>    $ cat .hg/patches/git
>    # HG changeset patch
> @@ -104,6 +105,7 @@
>
>    $ echo a >> a
>    $ hg qrefresh -d '0 0'
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>    $ cat .hg/patches/git
>    # HG changeset patch
> @@ -146,6 +148,7 @@
>
>    $ echo a >> a
>    $ hg qrefresh -d '0 0'
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>    $ cat .hg/patches/git
>    # HG changeset patch
> @@ -191,6 +194,7 @@
>
>    $ hg cp a c
>    $ hg qrefresh -d '0 0'
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>    $ cat .hg/patches/regular
>    # HG changeset patch
> diff --git a/tests/test-mq-guards.t b/tests/test-mq-guards.t
> --- a/tests/test-mq-guards.t
> +++ b/tests/test-mq-guards.t
> @@ -12,16 +12,19 @@
>    $ echo a > a
>    $ hg add a
>    $ hg qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>    $ hg qnew b.patch
>    $ echo b > b
>    $ hg add b
>    $ hg qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>    $ hg qnew c.patch
>    $ echo c > c
>    $ hg add c
>    $ hg qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>    $ hg qpop -a
>    popping c.patch
> diff --git a/tests/test-mq-header-date.t b/tests/test-mq-header-date.t
> --- a/tests/test-mq-header-date.t
> +++ b/tests/test-mq-header-date.t
> @@ -205,6 +205,7 @@
>    0: [mq]: 1.patch - test - 3.00
>    ==== qref
>    adding 1
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    Date: 3 0
>
>    diff -r ... 1
> @@ -214,6 +215,7 @@
>    +1
>    0: [mq]: 1.patch - test - 3.00
>    ==== qref -d
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    Date: 4 0
>
>    diff -r ... 1
> @@ -224,6 +226,7 @@
>    0: [mq]: 1.patch - test - 4.00
>    ==== qnew
>    adding 2
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    diff -r ... 2
>    --- /dev/null
>    +++ b/2
> @@ -232,6 +235,7 @@
>    1: [mq]: 2.patch - test
>    0: [mq]: 1.patch - test
>    ==== qref -d
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    Date: 5 0
>
>    diff -r ... 2
> @@ -252,6 +256,7 @@
>    0: [mq]: 1.patch - test - 4.00
>    ==== qref
>    adding 3
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    Date: 6 0
>
>    Three
> @@ -264,6 +269,7 @@
>    1: Three - test - 6.00
>    0: [mq]: 1.patch - test - 4.00
>    ==== qref -m
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    Date: 6 0
>
>    Drei
> @@ -276,6 +282,7 @@
>    1: Drei - test - 6.00
>    0: [mq]: 1.patch - test - 4.00
>    ==== qref -d
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    Date: 7 0
>
>    Drei
> @@ -288,6 +295,7 @@
>    1: Drei - test - 7.00
>    0: [mq]: 1.patch - test - 4.00
>    ==== qref -d -m
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    Date: 8 0
>
>    Three (again)
> @@ -301,6 +309,7 @@
>    0: [mq]: 1.patch - test - 4.00
>    ==== qnew -m
>    adding 4
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    Four
>
>    diff -r ... 4
> @@ -312,6 +321,7 @@
>    1: Three (again) - test
>    0: [mq]: 1.patch - test
>    ==== qref -d
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    Date: 9 0
>
>    Four
> @@ -336,6 +346,7 @@
>    0: [mq]: 1.patch - test - 4.00
>    ==== hg qref
>    adding 5
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # Date 10 0
>    # Parent
> @@ -349,6 +360,7 @@
>    1: Three (again) - test - 8.00
>    0: [mq]: 1.patch - test - 4.00
>    ==== hg qref -d
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # Date 11 0
>    # Parent
> @@ -373,6 +385,7 @@
>    0: [mq]: 1.patch - test
>    ==== hg qref
>    adding 6
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    Date: 12 0
>
>    diff -r ... 6
> @@ -385,6 +398,7 @@
>    1: Three (again) - test - 8.00
>    0: [mq]: 1.patch - test - 4.00
>    ==== hg qref -d
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    Date: 13 0
>
>    diff -r ... 6
> @@ -400,6 +414,7 @@
>    now at: 5.patch
>    ==== qnew -u
>    adding 6
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    From: jane
>
>    diff -r ... 6
> @@ -412,6 +427,7 @@
>    1: Three (again) - test
>    0: [mq]: 1.patch - test
>    ==== qref -d
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    From: jane
>    Date: 12 0
>
> @@ -428,6 +444,7 @@
>    now at: 5.patch
>    ==== qnew -d
>    adding 7
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    Date: 13 0
>
>    diff -r ... 7
> @@ -440,6 +457,7 @@
>    1: Three (again) - test
>    0: [mq]: 1.patch - test
>    ==== qref -u
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    From: john
>    Date: 13 0
>
> @@ -454,6 +472,7 @@
>    0: [mq]: 1.patch - test - 4.00
>    ==== qnew
>    adding 8
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    diff -r ... 8
>    --- /dev/null
>    +++ b/8
> @@ -465,6 +484,7 @@
>    1: Three (again) - test
>    0: [mq]: 1.patch - test
>    ==== qref -u -d
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    From: john
>    Date: 14 0
>
> @@ -482,6 +502,7 @@
>    now at: 7.patch
>    ==== qnew -m
>    adding 9
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    Nine
>
>    diff -r ... 9
> @@ -495,6 +516,7 @@
>    1: Three (again) - test
>    0: [mq]: 1.patch - test
>    ==== qref -u -d
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    From: john
>    Date: 15 0
>
> @@ -543,6 +565,7 @@
>    0: [mq]: 1.patch - test - 3.00
>    ==== qref
>    adding 1
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # Date 3 0
>    # Parent
> @@ -554,6 +577,7 @@
>    +1
>    0: [mq]: 1.patch - test - 3.00
>    ==== qref -d
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # Date 4 0
>    # Parent
> @@ -566,6 +590,7 @@
>    0: [mq]: 1.patch - test - 4.00
>    ==== qnew
>    adding 2
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # Parent
>
> @@ -577,6 +602,7 @@
>    1: [mq]: 2.patch - test
>    0: [mq]: 1.patch - test
>    ==== qref -d
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # Date 5 0
>    # Parent
> @@ -600,6 +626,7 @@
>    0: [mq]: 1.patch - test - 4.00
>    ==== qref
>    adding 3
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # Date 6 0
>    # Parent
> @@ -613,6 +640,7 @@
>    1: Three - test - 6.00
>    0: [mq]: 1.patch - test - 4.00
>    ==== qref -m
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # Date 6 0
>    # Parent
> @@ -626,6 +654,7 @@
>    1: Drei - test - 6.00
>    0: [mq]: 1.patch - test - 4.00
>    ==== qref -d
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # Date 7 0
>    # Parent
> @@ -639,6 +668,7 @@
>    1: Drei - test - 7.00
>    0: [mq]: 1.patch - test - 4.00
>    ==== qref -d -m
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # Date 8 0
>    # Parent
> @@ -653,6 +683,7 @@
>    0: [mq]: 1.patch - test - 4.00
>    ==== qnew -m
>    adding 4
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # Parent
>    Four
> @@ -666,6 +697,7 @@
>    1: Three (again) - test
>    0: [mq]: 1.patch - test
>    ==== qref -d
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # Date 9 0
>    # Parent
> @@ -691,6 +723,7 @@
>    0: [mq]: 1.patch - test - 4.00
>    ==== hg qref
>    adding 5
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # Date 10 0
>    # Parent
> @@ -704,6 +737,7 @@
>    1: Three (again) - test - 8.00
>    0: [mq]: 1.patch - test - 4.00
>    ==== hg qref -d
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # Date 11 0
>    # Parent
> @@ -728,6 +762,7 @@
>    0: [mq]: 1.patch - test
>    ==== hg qref
>    adding 6
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    Date: 12 0
>
>    diff -r ... 6
> @@ -740,6 +775,7 @@
>    1: Three (again) - test - 8.00
>    0: [mq]: 1.patch - test - 4.00
>    ==== hg qref -d
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    Date: 13 0
>
>    diff -r ... 6
> @@ -755,6 +791,7 @@
>    now at: 5.patch
>    ==== qnew -u
>    adding 6
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # User jane
>    # Parent
> @@ -769,6 +806,7 @@
>    1: Three (again) - test
>    0: [mq]: 1.patch - test
>    ==== qref -d
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # User jane
>    # Date 12 0
> @@ -787,6 +825,7 @@
>    now at: 5.patch
>    ==== qnew -d
>    adding 7
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # Date 13 0
>    # Parent
> @@ -801,6 +840,7 @@
>    1: Three (again) - test
>    0: [mq]: 1.patch - test
>    ==== qref -u
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # User john
>    # Date 13 0
> @@ -817,6 +857,7 @@
>    0: [mq]: 1.patch - test - 4.00
>    ==== qnew
>    adding 8
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # Parent
>
> @@ -831,6 +872,7 @@
>    1: Three (again) - test
>    0: [mq]: 1.patch - test
>    ==== qref -u -d
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # User john
>    # Date 14 0
> @@ -850,6 +892,7 @@
>    now at: 7.patch
>    ==== qnew -m
>    adding 9
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # Parent
>    Nine
> @@ -865,6 +908,7 @@
>    1: Three (again) - test
>    0: [mq]: 1.patch - test
>    ==== qref -u -d
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # User john
>    # Date 15 0
> diff --git a/tests/test-mq-header-from.t b/tests/test-mq-header-from.t
> --- a/tests/test-mq-header-from.t
> +++ b/tests/test-mq-header-from.t
> @@ -138,6 +138,7 @@
>    0: [mq]: 1.patch - test
>    ==== qref
>    adding 1
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    From: test
>
>    diff -r ... 1
> @@ -147,6 +148,7 @@
>    +1
>    0: [mq]: 1.patch - test
>    ==== qref -u
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    From: mary
>
>    diff -r ... 1
> @@ -157,6 +159,7 @@
>    0: [mq]: 1.patch - mary
>    ==== qnew
>    adding 2
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    diff -r ... 2
>    --- /dev/null
>    +++ b/2
> @@ -165,6 +168,7 @@
>    1: [mq]: 2.patch - test
>    0: [mq]: 1.patch - mary
>    ==== qref -u
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    From: jane
>
>    diff -r ... 2
> @@ -184,6 +188,7 @@
>    0: [mq]: 1.patch - mary
>    ==== qref
>    adding 3
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    From: test
>
>    Three
> @@ -197,6 +202,7 @@
>    1: [mq]: 2.patch - jane
>    0: [mq]: 1.patch - mary
>    ==== qref -m
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    From: test
>
>    Drei
> @@ -210,6 +216,7 @@
>    1: [mq]: 2.patch - jane
>    0: [mq]: 1.patch - mary
>    ==== qref -u
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    From: mary
>
>    Drei
> @@ -223,6 +230,7 @@
>    1: [mq]: 2.patch - jane
>    0: [mq]: 1.patch - mary
>    ==== qref -u -m
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    From: maria
>
>    Three (again)
> @@ -237,6 +245,7 @@
>    0: [mq]: 1.patch - mary
>    ==== qnew -m
>    adding 4of
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    Four
>
>    diff -r ... 4of
> @@ -249,6 +258,7 @@
>    1: [mq]: 2.patch - jane
>    0: [mq]: 1.patch - mary
>    ==== qref -u
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    From: jane
>
>    Four
> @@ -275,6 +285,7 @@
>    0: [mq]: 1.patch - mary
>    ==== hg qref
>    adding 5
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # User johndoe
>    # Parent
> @@ -290,6 +301,7 @@
>    1: [mq]: 2.patch - jane
>    0: [mq]: 1.patch - mary
>    ==== hg qref -U
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # User test
>    # Parent
> @@ -305,6 +317,7 @@
>    1: [mq]: 2.patch - jane
>    0: [mq]: 1.patch - mary
>    ==== hg qref -u
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # User johndeere
>    # Parent
> @@ -333,6 +346,7 @@
>    0: [mq]: 1.patch - mary
>    ==== hg qref
>    adding 6
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    From: test
>
>    diff -r ... 6
> @@ -347,6 +361,7 @@
>    1: [mq]: 2.patch - jane
>    0: [mq]: 1.patch - mary
>    ==== hg qref -U
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    From: test
>
>    diff -r ... 6
> @@ -361,6 +376,7 @@
>    1: [mq]: 2.patch - jane
>    0: [mq]: 1.patch - mary
>    ==== hg qref -u
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    From: johndeere
>
>    diff -r ... 6
> @@ -411,6 +427,7 @@
>    0: [mq]: 1.patch - test
>    ==== qref
>    adding 1
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # User test
>    # Parent
> @@ -422,6 +439,7 @@
>    +1
>    0: [mq]: 1.patch - test
>    ==== qref -u
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # User mary
>    # Parent
> @@ -434,6 +452,7 @@
>    0: [mq]: 1.patch - mary
>    ==== qnew
>    adding 2
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # Parent
>
> @@ -445,6 +464,7 @@
>    1: [mq]: 2.patch - test
>    0: [mq]: 1.patch - mary
>    ==== qref -u
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # User jane
>    # Parent
> @@ -467,6 +487,7 @@
>    0: [mq]: 1.patch - mary
>    ==== qref
>    adding 3
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # User test
>    # Parent
> @@ -481,6 +502,7 @@
>    1: [mq]: 2.patch - jane
>    0: [mq]: 1.patch - mary
>    ==== qref -m
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # User test
>    # Parent
> @@ -495,6 +517,7 @@
>    1: [mq]: 2.patch - jane
>    0: [mq]: 1.patch - mary
>    ==== qref -u
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # User mary
>    # Parent
> @@ -509,6 +532,7 @@
>    1: [mq]: 2.patch - jane
>    0: [mq]: 1.patch - mary
>    ==== qref -u -m
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # User maria
>    # Parent
> @@ -524,6 +548,7 @@
>    0: [mq]: 1.patch - mary
>    ==== qnew -m
>    adding 4of
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # Parent
>    Four
> @@ -538,6 +563,7 @@
>    1: [mq]: 2.patch - jane
>    0: [mq]: 1.patch - mary
>    ==== qref -u
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # User jane
>    # Parent
> @@ -565,6 +591,7 @@
>    0: [mq]: 1.patch - mary
>    ==== hg qref
>    adding 5
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # User johndoe
>    # Parent
> @@ -580,6 +607,7 @@
>    1: [mq]: 2.patch - jane
>    0: [mq]: 1.patch - mary
>    ==== hg qref -U
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # User test
>    # Parent
> @@ -595,6 +623,7 @@
>    1: [mq]: 2.patch - jane
>    0: [mq]: 1.patch - mary
>    ==== hg qref -u
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # User johndeere
>    # Parent
> @@ -623,6 +652,7 @@
>    0: [mq]: 1.patch - mary
>    ==== hg qref
>    adding 6
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    From: test
>
>    diff -r ... 6
> @@ -637,6 +667,7 @@
>    1: [mq]: 2.patch - jane
>    0: [mq]: 1.patch - mary
>    ==== hg qref -U
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    From: test
>
>    diff -r ... 6
> @@ -651,6 +682,7 @@
>    1: [mq]: 2.patch - jane
>    0: [mq]: 1.patch - mary
>    ==== hg qref -u
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    From: johndeere
>
>    diff -r ... 6
> @@ -696,6 +728,7 @@
>    0: [mq]: 1.patch - test
>    ==== qref
>    adding 1
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # User test
>    # Parent
> @@ -707,6 +740,7 @@
>    +1
>    0: [mq]: 1.patch - test
>    ==== qref -u
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # User mary
>    # Parent
> @@ -719,6 +753,7 @@
>    0: [mq]: 1.patch - mary
>    ==== qnew
>    adding 2
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # Parent
>
> @@ -730,6 +765,7 @@
>    1: [mq]: 2.patch - test
>    0: [mq]: 1.patch - mary
>    ==== qref -u
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # User jane
>    # Parent
> @@ -752,6 +788,7 @@
>    0: [mq]: 1.patch - mary
>    ==== qref
>    adding 3
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # User test
>    # Parent
> @@ -766,6 +803,7 @@
>    1: [mq]: 2.patch - jane
>    0: [mq]: 1.patch - mary
>    ==== qref -m
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # User test
>    # Parent
> @@ -780,6 +818,7 @@
>    1: [mq]: 2.patch - jane
>    0: [mq]: 1.patch - mary
>    ==== qref -u
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # User mary
>    # Parent
> @@ -794,6 +833,7 @@
>    1: [mq]: 2.patch - jane
>    0: [mq]: 1.patch - mary
>    ==== qref -u -m
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # User maria
>    # Parent
> @@ -809,6 +849,7 @@
>    0: [mq]: 1.patch - mary
>    ==== qnew -m
>    adding 4of
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # Parent
>    Four
> @@ -823,6 +864,7 @@
>    1: [mq]: 2.patch - jane
>    0: [mq]: 1.patch - mary
>    ==== qref -u
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # User jane
>    # Parent
> @@ -850,6 +892,7 @@
>    0: [mq]: 1.patch - mary
>    ==== hg qref
>    adding 5
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # User johndoe
>    # Parent
> @@ -865,6 +908,7 @@
>    1: [mq]: 2.patch - jane
>    0: [mq]: 1.patch - mary
>    ==== hg qref -U
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # User test
>    # Parent
> @@ -880,6 +924,7 @@
>    1: [mq]: 2.patch - jane
>    0: [mq]: 1.patch - mary
>    ==== hg qref -u
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    # HG changeset patch
>    # User johndeere
>    # Parent
> @@ -908,6 +953,7 @@
>    0: [mq]: 1.patch - mary
>    ==== hg qref
>    adding 6
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    From: test
>
>    diff -r ... 6
> @@ -922,6 +968,7 @@
>    1: [mq]: 2.patch - jane
>    0: [mq]: 1.patch - mary
>    ==== hg qref -U
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    From: test
>
>    diff -r ... 6
> @@ -936,6 +983,7 @@
>    1: [mq]: 2.patch - jane
>    0: [mq]: 1.patch - mary
>    ==== hg qref -u
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    From: johndeere
>
>    diff -r ... 6
> diff --git a/tests/test-mq-merge.t b/tests/test-mq-merge.t
> --- a/tests/test-mq-merge.t
> +++ b/tests/test-mq-merge.t
> @@ -54,6 +54,7 @@
>    $ hg qnew rm_a
>    $ hg rm a
>    $ hg qrefresh -m "rm a"
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>  Save the patch queue so we can merge it later:
>
> diff --git a/tests/test-mq-pull-from-bundle.t
> b/tests/test-mq-pull-from-bundle.t
> --- a/tests/test-mq-pull-from-bundle.t
> +++ b/tests/test-mq-pull-from-bundle.t
> @@ -50,6 +50,7 @@
>    $ hg add
>    adding two
>    $ hg qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    $ hg qcommit -m "queue: two.patch added"
>    $ hg qpop -a
>    popping two.patch
> diff --git a/tests/test-mq-qdelete.t b/tests/test-mq-qdelete.t
> --- a/tests/test-mq-qdelete.t
> +++ b/tests/test-mq-qdelete.t
> @@ -175,6 +175,7 @@
>    now at: 3.diff
>    $ echo next >>  base
>    $ hg qrefresh -d '1 0'
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    $ echo > .hg/patches/series # remove 3.diff from series to confuse mq
>    $ hg qfinish -a
>    revision 47dfa8501675 refers to unknown patches: 3.diff
> diff --git a/tests/test-mq-qdiff.t b/tests/test-mq-qdiff.t
> --- a/tests/test-mq-qdiff.t
> +++ b/tests/test-mq-qdiff.t
> @@ -16,6 +16,7 @@
>
>    $ echo 'patched' > base
>    $ hg qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>  qdiff:
>
> @@ -141,6 +142,7 @@
>  qdiff preserve existing git flag:
>
>    $ hg qrefresh --git
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    $ echo a >> lines
>    $ hg qdiff
>    diff --git a/lines b/lines
> @@ -166,6 +168,7 @@
>     lines |  7 +++++--
>     1 files changed, 5 insertions(+), 2 deletions(-)
>    $ hg qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>  qdiff when file deleted (but not removed) in working dir:
>
> @@ -173,6 +176,7 @@
>    $ echo a > newfile
>    $ hg add newfile
>    $ hg qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    $ rm newfile
>    $ hg qdiff
>
> diff --git a/tests/test-mq-qfold.t b/tests/test-mq-qfold.t
> --- a/tests/test-mq-qfold.t
> +++ b/tests/test-mq-qfold.t
> @@ -39,6 +39,7 @@
>    +a
>
>    $ HGEDITOR=cat hg qfold p2
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    $ grep git .hg/patches/p1 && echo 'git patch found!'
>    [1]
>
> @@ -86,6 +87,7 @@
>    now at: regular
>
>    $ hg qfold git
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>    $ cat .hg/patches/regular
>    # HG changeset patch
> @@ -128,6 +130,7 @@
>    now at: git
>
>    $ hg qfold regular
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>    $ cat .hg/patches/git
>    # HG changeset patch
> @@ -147,6 +150,7 @@
>  Test saving last-message.txt:
>
>    $ hg qrefresh -m "original message"
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>    $ cat > $TESTTMP/commitfailure.py <<EOF
>    > from mercurial import util
> diff --git a/tests/test-mq-qgoto.t b/tests/test-mq-qgoto.t
> --- a/tests/test-mq-qgoto.t
> +++ b/tests/test-mq-qgoto.t
> @@ -10,16 +10,19 @@
>    $ hg qnew a.patch
>    $ echo a >> a
>    $ hg qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>    $ hg qnew b.patch
>    $ echo b > b
>    $ hg add b
>    $ hg qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>    $ hg qnew c.patch
>    $ echo c > c
>    $ hg add c
>    $ hg qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>    $ hg qgoto a.patch
>    popping c.patch
> @@ -52,9 +55,11 @@
>    $ hg qnew bug314159
>    $ echo d >> c
>    $ hg qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    $ hg qnew bug141421
>    $ echo e >> b
>    $ hg qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>    $ hg up -r bug314159
>    1 files updated, 0 files merged, 0 files removed, 0 files unresolved
> diff --git a/tests/test-mq-qpush-fail.t b/tests/test-mq-qpush-fail.t
> --- a/tests/test-mq-qpush-fail.t
> +++ b/tests/test-mq-qpush-fail.t
> @@ -19,13 +19,16 @@
>    $ hg qnew patch1
>    $ echo >> foo
>    $ hg qrefresh -m 'patch 1'
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    $ hg qnew patch2
>    $ echo bar > bar
>    $ hg add bar
>    $ hg qrefresh -m 'patch 2'
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    $ hg qnew --config 'mq.plain=true' -U bad-patch
>    $ echo >> foo
>    $ hg qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    $ hg qpop -a
>    popping bad-patch
>    popping patch2
> diff --git a/tests/test-mq-qrefresh-interactive.t
> b/tests/test-mq-qrefresh-interactive.t
> --- a/tests/test-mq-qrefresh-interactive.t
> +++ b/tests/test-mq-qrefresh-interactive.t
> @@ -223,6 +223,7 @@
>    1 hunks, 1 lines changed
>    examine changes to 'dir/a.txt'? [Ynesfdaq?] n
>
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>  After partial qrefresh 'tip'
>
> @@ -313,6 +314,7 @@
>     up
>    record change 2/2 to 'dir/a.txt'? [Ynesfdaq?] y
>
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>  After final qrefresh 'tip'
>
> diff --git a/tests/test-mq-qrefresh-replace-log-message.t
> b/tests/test-mq-qrefresh-replace-log-message.t
> --- a/tests/test-mq-qrefresh-replace-log-message.t
> +++ b/tests/test-mq-qrefresh-replace-log-message.t
> @@ -19,6 +19,7 @@
>    $ echo aaaa > file
>    $ hg add file
>    $ HGEDITOR=cat hg qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>  Should display 'First commit message'
>
> @@ -59,6 +60,7 @@
>    HG: user: test
>    HG: branch 'default'
>    HG: added file
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>    $ cat >> .hg/hgrc <<EOF
>    > # disable customizing for subsequent tests
> @@ -77,6 +79,7 @@
>    $ echo " This is the 3rd log message" >> logfile
>    $ echo bbbb > file
>    $ hg qrefresh -l logfile
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>  Should display 'Third commit message\\\n This is the 3rd log message'
>
> @@ -91,6 +94,7 @@
>    $ hg add file2
>    $ echo bbbb > file2
>    $ (echo "Fifth commit message"; echo " This is the 5th log message") |
> hg qrefresh -l-
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>  Should display 'Fifth commit message\\\n This is the 5th log message'
>
> diff --git a/tests/test-mq-qrefresh.t b/tests/test-mq-qrefresh.t
> --- a/tests/test-mq-qrefresh.t
> +++ b/tests/test-mq-qrefresh.t
> @@ -20,6 +20,7 @@
>    $ echo 'patched' > 1/base
>    $ echo 'patched' > 2/base
>    $ hg qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>    $ hg qdiff
>    diff -r e7af5904b465 1/base
> @@ -69,6 +70,7 @@
>
>    $ echo 'patched again' > base
>    $ hg qrefresh 1
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>    $ hg qdiff
>    diff -r e7af5904b465 1/base
> @@ -113,6 +115,7 @@
>  qrefresh . in subdir:
>
>    $ ( cd 1 ; hg qrefresh . )
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>    $ hg qdiff
>    diff -r e7af5904b465 1/base
> @@ -157,6 +160,7 @@
>  qrefresh in hg-root again:
>
>    $ hg qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>    $ hg qdiff
>    diff -r e7af5904b465 1/base
> @@ -211,9 +215,12 @@
>    $ hg add orphanchild
>    $ hg qrefresh nonexistentfilename # clear patch
>    nonexistentfilename: * (glob)
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    $ hg diff -c qtip
>    $ hg qrefresh --short 1/base
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    $ hg qrefresh --short 2/base
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>    $ hg qdiff
>    diff -r e7af5904b465 1/base
> @@ -288,6 +295,7 @@
>  Exclude 2/base:
>
>    $ hg qref -s -X 2/base
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>    $ cat .hg/patches/mqbase
>    # HG changeset patch
> @@ -311,6 +319,7 @@
>  Remove 1/base and add 2/base again but not orphanchild:
>
>    $ hg qref -s -X orphanchild -X 1/base 2/base orphanchild
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>    $ cat .hg/patches/mqbase
>    # HG changeset patch
> @@ -327,6 +336,7 @@
>  Add 1/base with include filter - and thus remove 2/base from patch:
>
>    $ hg qref -s -I 1/ o* */*
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>    $ cat .hg/patches/mqbase
>    # HG changeset patch
> @@ -384,6 +394,7 @@
>  Refresh and check changes again:
>
>    $ hg qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>    $ hg qdiff
>    diff --git a/a b/ab
> @@ -415,6 +426,7 @@
>    $ hg qnew -f p
>    $ hg mv a b
>    $ hg qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>    $ hg qdiff
>    diff -r 000000000000 b
> @@ -445,6 +457,7 @@
>  refresh with tip != qtip:
>
>    $ hg --config diff.nodates=1 qrefresh -I b
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>    $ hg st
>    M a
> @@ -480,6 +493,7 @@
>    $ hg qnew -f p
>    $ hg mv a b
>    $ hg qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>    $ hg qdiff --nodates
>    diff --git a/b b/b
> @@ -541,11 +555,13 @@
>    2: draft
>    $ echo 'beber' >> a
>    $ hg qref
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    $ hg phase p2.diff
>    2: draft
>    $ hg phase --force --secret p2.diff
>    $ echo 'bibir' >> a
>    $ hg qref
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    $ hg phase p2.diff
>    2: secret
>
> diff --git a/tests/test-mq-qrename.t b/tests/test-mq-qrename.t
> --- a/tests/test-mq-qrename.t
> +++ b/tests/test-mq-qrename.t
> @@ -110,6 +110,7 @@
>    now at: adda
>    $ hg ci --mq -m "save mq"
>    $ hg qfold addb
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    $ hg qmv addb
>    $ cat .hg/patches/addb
>    # HG changeset patch
> diff --git a/tests/test-mq-safety.t b/tests/test-mq-safety.t
> --- a/tests/test-mq-safety.t
> +++ b/tests/test-mq-safety.t
> @@ -12,10 +12,12 @@
>    $ hg qnew foo
>    $ echo foo >> foo
>    $ hg qrefresh -m 'append foo'
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>    $ hg qnew bar
>    $ echo bar >> foo
>    $ hg qrefresh -m 'append bar'
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>  Try to operate on public mq changeset
>
> diff --git a/tests/test-mq-subrepo.t b/tests/test-mq-subrepo.t
> --- a/tests/test-mq-subrepo.t
> +++ b/tests/test-mq-subrepo.t
> @@ -169,6 +169,7 @@
>    A .hgsub
>    A sub/a
>    % qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    path sub
>     source   sub
>     revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31
> @@ -186,6 +187,7 @@
>    M .hgsub
>    A sub2/a
>    % qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    path sub
>     source   sub
>     revision b2fdb12cd82b021c3b7053d67802e77b6eeaee31
> @@ -202,6 +204,7 @@
>    M sub3/a
>    R .hgsub
>    % qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    % debugsub should be empty
>
>    $ hg qpop -qa
> @@ -212,6 +215,7 @@
>    % update substate when removing .hgsub w/clean updated subrepo
>    R .hgsub
>    % qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    % debugsub should be empty
>    $ EXTRA=
>
> @@ -494,6 +498,7 @@
>    $ hg -R sub commit -u test -d '0 0' -Am '#1 in sub'
>    adding sb
>    $ hg qrefresh -u test -d '0 0'
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    $ hg -R sub parents --template '{node} sub\n'
>    88ac1bef5ed43b689d1d200b59886b675dec474b sub
>    $ cat .hgsubstate
> @@ -521,6 +526,7 @@
>    .hgsubstate
>
>    $ hg qrefresh -u test -d '0 0'
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    $ cat .hgsubstate
>    88ac1bef5ed43b689d1d200b59886b675dec474b sub
>    $ hg diff -c tip
> @@ -603,6 +609,7 @@
>    $ echo > .hgsubstate
>    $ hg add .hgsub .hgsubstate
>    $ hg qrefresh -u test -d '0 0'
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    $ hg parents --template '{node}\n'
>    7c48c35501aae6770ed9c2517014628615821a8e
>    $ hg parents --template '{files}\n'
> @@ -616,6 +623,7 @@
>    $ hg add .hgsub
>    $ rm -f .hgsubstate
>    $ hg qrefresh -u test -d '0 0'
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    $ hg parents --template '{node}\n'
>    7c48c35501aae6770ed9c2517014628615821a8e
>    $ hg parents --template '{files}\n'
> diff --git a/tests/test-mq-symlinks.t b/tests/test-mq-symlinks.t
> --- a/tests/test-mq-symlinks.t
> +++ b/tests/test-mq-symlinks.t
> @@ -11,6 +11,7 @@
>    $ echo ccc > c
>    $ hg add a b c
>    $ hg qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    $ readlink.py a
>    a -> a not a symlink
>
> @@ -21,6 +22,7 @@
>    $ rm a
>    $ ln -s b a
>    $ hg qrefresh --git
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    $ readlink.py a
>    a -> b
>
> @@ -81,6 +83,7 @@
>    $ hg qnew removesl.patch
>    $ hg rm a
>    $ hg qrefresh --git
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    $ hg qpop
>    popping removesl.patch
>    now at: replacelinkwithfile
> diff --git a/tests/test-mq.t b/tests/test-mq.t
> --- a/tests/test-mq.t
> +++ b/tests/test-mq.t
> @@ -169,11 +169,13 @@
>    0: draft
>    $ hg add foo
>    $ hg qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    $ hg phase -r qbase
>    0: draft
>    $ hg qnew B
>    $ echo >> foo
>    $ hg qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    $ echo status >> .hg/patches/.hgignore
>    $ echo bleh >> .hg/patches/.hgignore
>    $ hg qinit -c
> @@ -261,6 +263,7 @@
>
>    $ echo a >> a
>    $ hg qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    $ cat .hg/patches/test.patch
>    foo bar
>
> @@ -274,6 +277,7 @@
>  empty qrefresh
>
>    $ hg qrefresh -X a
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>  revision:
>
> @@ -297,6 +301,7 @@
>  restore things
>
>    $ hg qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    $ checkundo qrefresh
>
>
> @@ -350,6 +355,7 @@
>    $ echo a > a
>    $ hg add a
>    $ hg qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>  pop/push -a in subdir
>
> @@ -452,6 +458,7 @@
>    $ echo 1b > 1b
>    $ hg add 1b
>    $ hg qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    $ hg qpush 2
>    applying test2.patch
>    now at: test2.patch
> @@ -813,11 +820,13 @@
>    $ hg qnew -mfoo foo
>    $ echo a >> a
>    $ hg qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    $ mkdir b
>    $ cd b
>    $ echo f > f
>    $ hg add f
>    $ hg qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    $ cat ../.hg/patches/foo
>    foo
>
> @@ -836,6 +845,7 @@
>  hg qrefresh .
>
>    $ hg qrefresh .
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    $ cat ../.hg/patches/foo
>    foo
>
> @@ -852,11 +862,13 @@
>
>    $ cd ..
>    $ hg qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    $ hg qnew -mbar bar
>    $ echo foo > foo
>    $ echo bar > bar
>    $ hg add foo bar
>    $ hg qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    $ hg qpop -a
>    popping bar
>    popping foo
> @@ -931,6 +943,7 @@
>  #endif
>    $ hg add new
>    $ hg qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>  #if execbit
>    $ cat .hg/patches/new
>    new file
> @@ -956,6 +969,7 @@
>    $ hg qnew -m'copy file' copy
>    $ hg cp new copy
>    $ hg qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    $ cat .hg/patches/copy
>    copy file
>
> @@ -1016,6 +1030,7 @@
>    $ hg add bar
>    $ hg mv foo baz
>    $ hg qrefresh --git
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    $ hg up -C 0
>    1 files updated, 0 files merged, 2 files removed, 0 files unresolved
>    $ echo >> foo
> @@ -1024,6 +1039,7 @@
>    $ hg up -C 1
>    2 files updated, 0 files merged, 1 files removed, 0 files unresolved
>    $ hg qrefresh --git
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    $ cat .hg/patches/bar
>    diff --git a/bar b/bar
>    new file mode 100644
> @@ -1037,6 +1053,7 @@
>    $ hg log -v --template '{rev} {file_copies}\n' -r .
>    2 baz (foo)
>    $ hg qrefresh --git
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    $ cat .hg/patches/bar
>    diff --git a/bar b/bar
>    new file mode 100644
> @@ -1050,6 +1067,7 @@
>    $ hg log -v --template '{rev} {file_copies}\n' -r .
>    2 baz (foo)
>    $ hg qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    $ grep 'diff --git' .hg/patches/bar
>    diff --git a/bar b/bar
>    diff --git a/foo b/baz
> @@ -1066,6 +1084,7 @@
>    $ hg mv bar quux
>    $ hg mv baz bleh
>    $ hg qrefresh --git
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    $ cat .hg/patches/bar
>    diff --git a/foo b/bleh
>    rename from foo
> @@ -1081,6 +1100,7 @@
>    $ hg mv quux fred
>    $ hg mv bleh barney
>    $ hg qrefresh --git
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    $ cat .hg/patches/bar
>    diff --git a/foo b/barney
>    rename from foo
> @@ -1101,9 +1121,11 @@
>    $ echo newfile > newfile
>    $ hg add newfile
>    $ hg qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    $ hg st -A newfile
>    C newfile
>    $ hg qrefresh -X newfile
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    $ hg st -A newfile
>    A newfile
>    $ hg revert newfile
> @@ -1244,6 +1266,7 @@
>    $ hg qnew patch1
>    $ echo bar >> foo
>    $ hg qrefresh -m 'change foo'
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    $ cd ..
>
>
> @@ -1378,6 +1401,7 @@
>
>
>    $ hg qref -d '0 0'
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    $ hg qpop
>    popping empty
>    patch queue now empty
> @@ -1449,11 +1473,13 @@
>    $ hg qnew rename-dir
>    $ hg rm a
>    $ hg qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>    $ mkdir a b
>    $ touch a/a b/b
>    $ hg add -q a b
>    $ hg qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>
>  test popping must remove files added in subdirectories first
> @@ -1474,15 +1500,18 @@
>    $ echo a > TeXtFiLe.TxT
>    $ hg add TeXtFiLe.TxT
>    $ hg qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>    $ hg qnew add-file2
>    $ echo b > AnOtHeRFiLe.TxT
>    $ hg add AnOtHeRFiLe.TxT
>    $ hg qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>    $ hg qnew modify-file
>    $ echo c >> AnOtHeRFiLe.TxT
>    $ hg qrefresh
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>    $ hg qapplied
>    add-file1
> diff --git a/tests/test-rebase-abort.t b/tests/test-rebase-abort.t
> --- a/tests/test-rebase-abort.t
> +++ b/tests/test-rebase-abort.t
> @@ -207,11 +207,14 @@
>    $ hg book master
>    $ hg book foo
>    $ echo b > b && hg ci -Aqm b
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>    $ hg up -q master
>    $ echo c > c && hg ci -Aqm c
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>    $ hg phase -p -r .
>    $ hg up -q foo
>    $ echo C > c && hg ci -Aqm C
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>    $ hg log -G --template "{rev} {desc} {bookmarks}"
>    @  3 C foo
>    |
> @@ -251,9 +254,11 @@
>    $ echo original > a
>    $ hg add a
>    $ hg commit -m a
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>    $ echo x > b
>    $ hg add b
>    $ hg commit -m b1
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>    $ hg up 0
>    0 files updated, 0 files merged, 1 files removed, 0 files unresolved
>    (leaving bookmark @)
> @@ -261,6 +266,7 @@
>    $ echo y > b
>    $ hg add b
>    $ hg commit -m b2
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>    created new head
>
>    $ hg rebase -d @ -b foo --tool=internal:fail
> diff --git a/tests/test-rebase-bookmarks.t b/tests/test-rebase-bookmarks.t
> --- a/tests/test-rebase-bookmarks.t
> +++ b/tests/test-rebase-bookmarks.t
> @@ -26,6 +26,7 @@
>    $ echo c > c
>    $ hg ci -Am C
>    adding c
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>    $ hg book 'Z'
>
>    $ hg up -q 0
> diff --git a/tests/test-rebase-mq-skip.t b/tests/test-rebase-mq-skip.t
> --- a/tests/test-rebase-mq-skip.t
> +++ b/tests/test-rebase-mq-skip.t
> @@ -32,11 +32,13 @@
>    $ echo p0 > p0
>    $ hg add p0
>    $ hg qref -m P0
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>    $ hg qnew p1.patch -d '2 0'
>    $ echo p1 > p1
>    $ hg add p1
>    $ hg qref -m P1
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>    $ hg export qtip > p1.patch
>
> diff --git a/tests/test-rebase-mq.t b/tests/test-rebase-mq.t
> --- a/tests/test-rebase-mq.t
> +++ b/tests/test-rebase-mq.t
> @@ -27,10 +27,12 @@
>    $ hg qnew f.patch -d '1 0'
>    $ echo mq1 > f
>    $ hg qref -m P0
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>    $ hg qnew f2.patch
>    $ echo mq2 > f
>    $ hg qref -m P1 -d '2 0'
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>    $ hg tglog
>    @  3: 'P1' tags: f2.patch qtip tip
> @@ -159,10 +161,12 @@
>    $ echo mq1 > p
>    $ hg add p
>    $ hg qref --git -m 'P0 (git)'
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>    $ hg qnew f.patch -d '4 0'
>    $ echo mq2 > p
>    $ hg qref -m P1
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>    $ hg qci -m 'save patch state'
>
>    $ hg qseries -s
> @@ -316,6 +320,7 @@
>    1 files updated, 0 files merged, 1 files removed, 0 files unresolved
>    $ echo a >> a
>    $ hg qref
> +  devel-warn: bookmarks write with no lock at: */hgext/mq.py:1802
> (refresh) (glob)
>
>    $ hg tglog
>    @  3: '[mq]: bar' tags: bar qtip tip
> diff --git a/tests/test-rebase-pull.t b/tests/test-rebase-pull.t
> --- a/tests/test-rebase-pull.t
> +++ b/tests/test-rebase-pull.t
> @@ -87,6 +87,7 @@
>    added 1 changesets with 1 changes to 1 files
>    nothing to rebase - working directory parent is already an ancestor of
> destination 77ae9631bcca
>    1 files updated, 0 files merged, 0 files removed, 0 files unresolved
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>    updating bookmark norebase
>
>    $ hg tglog -l 1
> diff --git a/tests/test-rollback.t b/tests/test-rollback.t
> --- a/tests/test-rollback.t
> +++ b/tests/test-rollback.t
> @@ -73,10 +73,12 @@
>    M a
>    $ hg bookmark foo
>    $ hg commit -m'modify a again'
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>    $ echo b > b
>    $ hg bookmark bar -r default #making bar active, before the transaction
>    $ hg commit -Am'add b'
>    adding b
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>    $ hg log --template '{rev}  {branch}  {desc|firstline}\n'
>    2  test  add b
>    1  test  modify a again
> diff --git a/tests/test-share.t b/tests/test-share.t
> --- a/tests/test-share.t
> +++ b/tests/test-share.t
> @@ -158,6 +158,7 @@
>
>    $ echo 'shared bookmarks' > a
>    $ hg commit -m 'testing shared bookmarks'
> +  devel-warn: bookmarks write with no lock at: */hgext/share.py:171
> (write) (glob)
>    $ hg bookmarks
>     * bm1                       3:b87954705719
>       bm3                       2:c2e0ac586386
> @@ -167,6 +168,7 @@
>     * bm3                       2:c2e0ac586386
>    $ echo 'more shared bookmarks' > a
>    $ hg commit -m 'testing shared bookmarks'
> +  devel-warn: bookmarks write with no lock at: */hgext/share.py:171
> (write) (glob)
>    created new head
>    $ hg bookmarks
>       bm1                       3:b87954705719
> @@ -186,6 +188,7 @@
>    $ hg boo bm4
>    $ echo foo > b
>    $ hg commit -m 'foo in b'
> +  devel-warn: bookmarks write with no lock at: */hgext/share.py:171
> (write) (glob)
>    $ hg boo
>       bm1                       3:b87954705719
>       bm3                       4:62f4ded848e4
> diff --git a/tests/test-strip.t b/tests/test-strip.t
> --- a/tests/test-strip.t
> +++ b/tests/test-strip.t
> @@ -615,6 +615,7 @@
>    0 files updated, 0 files merged, 0 files removed, 0 files unresolved
>    (activating bookmark todelete)
>    $ hg strip -B nostrip
> +  devel-warn: bookmarks write with no lock at: */hgext/strip.py:152
> (stripcmd) (glob)
>    bookmark 'nostrip' deleted
>    abort: empty revision set
>    [255]
> diff --git a/tests/test-subrepo-svn.t b/tests/test-subrepo-svn.t
> --- a/tests/test-subrepo-svn.t
> +++ b/tests/test-subrepo-svn.t
> @@ -496,6 +496,7 @@
>  First, create that condition in the repository.
>
>    $ hg ci --subrepos -m cleanup | grep -v Updating
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>    committing subrepository obstruct
>    Sending        obstruct/other (glob)
>    Transmitting file data .
> @@ -537,10 +538,12 @@
>    Checked out revision 10.
>    $ echo "recreated =        [svn]       $SVNREPOURL/branch" >> .hgsub
>    $ hg ci -m addsub
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>    $ cd recreated
>    $ svn up -q
>    $ cd ..
>    $ hg ci -m updatesub
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>    $ hg up -r-2
>    D    *recreated/somethingnew (glob)
>    A    *recreated/somethingold (glob)
> diff --git a/tests/test-update-branches.t b/tests/test-update-branches.t
> --- a/tests/test-update-branches.t
> +++ b/tests/test-update-branches.t
> @@ -232,6 +232,7 @@
>    $ hg book -f bm
>    $ hg up
>    1 files updated, 0 files merged, 0 files removed, 0 files unresolved
> +  devel-warn: bookmarks write with no lock at:
> */mercurial/bookmarks.py:231 (update) (glob)
>    updating bookmark bm
>    $ hg book
>     * bm                        4:d047485b3896
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-devel/attachments/20150801/74bdd3f3/attachment-0002.html>


More information about the Mercurial-devel mailing list