changeset 24755:cd89f4e6faf2

devel-warn: add a prefix to all messages ("devel-warn: ") We want to make the origin and importance of the message clear to developers.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Wed, 15 Apr 2015 01:18:09 -0400
parents 5dc5cd7abbf5
children d71c2da01d0d
files mercurial/scmutil.py tests/test-devel-warnings.t
diffstat 2 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/scmutil.py	Wed Apr 15 10:36:21 2015 -0400
+++ b/mercurial/scmutil.py	Wed Apr 15 01:18:09 2015 -0400
@@ -174,6 +174,7 @@
 
 def develwarn(tui, msg):
     """issue a developer warning message"""
+    msg = 'devel-warn: ' + msg
     if tui.tracebackflag:
         util.debugstacktrace(msg, 2)
     else:
--- a/tests/test-devel-warnings.t	Wed Apr 15 10:36:21 2015 -0400
+++ b/tests/test-devel-warnings.t	Wed Apr 15 01:18:09 2015 -0400
@@ -50,18 +50,18 @@
   $ hg init lock-checker
   $ cd lock-checker
   $ hg buggylocking
-  transaction with no lock at: $TESTTMP/buggylocking.py:11 (buggylocking)
-  "wlock" acquired after "lock" at: $TESTTMP/buggylocking.py:13 (buggylocking)
+  devel-warn: transaction with no lock at: $TESTTMP/buggylocking.py:11 (buggylocking)
+  devel-warn: "wlock" acquired after "lock" at: $TESTTMP/buggylocking.py:13 (buggylocking)
   $ cat << EOF >> $HGRCPATH
   > [devel]
   > all=0
   > check-locks=1
   > EOF
   $ hg buggylocking
-  transaction with no lock at: $TESTTMP/buggylocking.py:11 (buggylocking)
-  "wlock" acquired after "lock" at: $TESTTMP/buggylocking.py:13 (buggylocking)
+  devel-warn: transaction with no lock at: $TESTTMP/buggylocking.py:11 (buggylocking)
+  devel-warn: "wlock" acquired after "lock" at: $TESTTMP/buggylocking.py:13 (buggylocking)
   $ hg buggylocking --traceback
-  transaction with no lock at:
+  devel-warn: transaction with no lock at:
    */hg:* in * (glob)
    */mercurial/dispatch.py:* in run (glob)
    */mercurial/dispatch.py:* in dispatch (glob)
@@ -73,7 +73,7 @@
    */mercurial/dispatch.py:* in <lambda> (glob)
    */mercurial/util.py:* in check (glob)
    $TESTTMP/buggylocking.py:* in buggylocking (glob)
-  "wlock" acquired after "lock" at:
+  devel-warn: "wlock" acquired after "lock" at:
    */hg:* in * (glob)
    */mercurial/dispatch.py:* in run (glob)
    */mercurial/dispatch.py:* in dispatch (glob)