# HG changeset patch # User Pierre-Yves David # Date 1429075089 14400 # Node ID cd89f4e6faf25d667293db155e78f5622f1c9389 # Parent 5dc5cd7abbf5ed0d5ab72a0891ccaa2127e502b1 devel-warn: add a prefix to all messages ("devel-warn: ") We want to make the origin and importance of the message clear to developers. diff -r 5dc5cd7abbf5 -r cd89f4e6faf2 mercurial/scmutil.py --- 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: diff -r 5dc5cd7abbf5 -r cd89f4e6faf2 tests/test-devel-warnings.t --- 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 (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)