wlock: reword the devel warning
authorPierre-Yves David <pierre-yves.david@fb.com>
Sun, 12 Apr 2015 13:28:35 -0400
changeset 24745 bc34b286781f
parent 24744 bedefc611f25
child 24746 e0c810d0ab69
wlock: reword the devel warning We change the wording of the developer warning: - "lock" taken before "wlock" + "wlock" acquired after "lock" The goals here are to: - Put the "subject" as the first word, - use "acquired" instead of "taken" since it seems more accurate.
mercurial/localrepo.py
tests/test-devel-warnings.t
--- a/mercurial/localrepo.py	Sun Apr 12 10:01:48 2015 -0400
+++ b/mercurial/localrepo.py	Sun Apr 12 13:28:35 2015 -0400
@@ -1213,7 +1213,7 @@
                 or self.ui.configbool('devel', 'check-locks')):
             l = self._lockref and self._lockref()
             if l is not None and l.held:
-                msg = '"lock" taken before "wlock"\n'
+                msg = '"wlock" acquired after "lock"\n'
                 if self.ui.tracebackflag:
                     util.debugstacktrace(msg, 1)
                 else:
--- a/tests/test-devel-warnings.t	Sun Apr 12 10:01:48 2015 -0400
+++ b/tests/test-devel-warnings.t	Sun Apr 12 13:28:35 2015 -0400
@@ -44,7 +44,7 @@
   $ cd lock-checker
   $ hg buggylocking
   transaction with no lock
-  "lock" taken before "wlock"
+  "wlock" acquired after "lock"
   $ cat << EOF >> $HGRCPATH
   > [devel]
   > all=0
@@ -52,7 +52,7 @@
   > EOF
   $ hg buggylocking
   transaction with no lock
-  "lock" taken before "wlock"
+  "wlock" acquired after "lock"
   $ hg buggylocking --traceback
   transaction with no lock
    at:
@@ -67,7 +67,7 @@
    */mercurial/dispatch.py:* in <lambda> (glob)
    */mercurial/util.py:* in check (glob)
    $TESTTMP/buggylocking.py:* in buggylocking (glob)
-  "lock" taken before "wlock"
+  "wlock" acquired after "lock"
    at:
    */hg:* in * (glob)
    */mercurial/dispatch.py:* in run (glob)