# HG changeset patch # User Pierre-Yves David # Date 1428863171 14400 # Node ID d6caadff47790d738f256ad44ee2b635e643ad03 # Parent bef8b17443a3bb951997f18138468fe07a6b002a develwarn: handle the end of line inside the function itself The traceback version should not have a end of line at all. The non-traceback version will requires the same things soon. diff -r bef8b17443a3 -r d6caadff4779 mercurial/localrepo.py --- a/mercurial/localrepo.py Sun Apr 12 14:24:28 2015 -0400 +++ b/mercurial/localrepo.py Sun Apr 12 14:26:11 2015 -0400 @@ -926,7 +926,7 @@ or self.ui.configbool('devel', 'check-locks')): l = self._lockref and self._lockref() if l is None or not l.held: - scmutil.develwarn(self.ui, 'transaction with no lock\n') + scmutil.develwarn(self.ui, 'transaction with no lock') tr = self.currenttransaction() if tr is not None: return tr.nest() @@ -1216,7 +1216,7 @@ or self.ui.configbool('devel', 'check-locks')): l = self._lockref and self._lockref() if l is not None and l.held: - scmutil.develwarn(self.ui, '"wlock" acquired after "lock"\n') + scmutil.develwarn(self.ui, '"wlock" acquired after "lock"') def unlock(): if self.dirstate.pendingparentchange(): diff -r bef8b17443a3 -r d6caadff4779 mercurial/scmutil.py --- a/mercurial/scmutil.py Sun Apr 12 14:24:28 2015 -0400 +++ b/mercurial/scmutil.py Sun Apr 12 14:26:11 2015 -0400 @@ -177,7 +177,7 @@ if tui.tracebackflag: util.debugstacktrace(msg, 2) else: - tui.write_err(msg) + tui.write_err(msg + '\n') def filteredhash(repo, maxrev): """build hash of filtered revisions in the current repoview. diff -r bef8b17443a3 -r d6caadff4779 tests/test-devel-warnings.t --- a/tests/test-devel-warnings.t Sun Apr 12 14:24:28 2015 -0400 +++ b/tests/test-devel-warnings.t Sun Apr 12 14:26:11 2015 -0400 @@ -54,8 +54,7 @@ transaction with no lock "wlock" acquired after "lock" $ hg buggylocking --traceback - transaction with no lock - at: + transaction with no lock at: */hg:* in * (glob) */mercurial/dispatch.py:* in run (glob) */mercurial/dispatch.py:* in dispatch (glob) @@ -67,8 +66,7 @@ */mercurial/dispatch.py:* in (glob) */mercurial/util.py:* in check (glob) $TESTTMP/buggylocking.py:* in buggylocking (glob) - "wlock" acquired after "lock" - at: + "wlock" acquired after "lock" at: */hg:* in * (glob) */mercurial/dispatch.py:* in run (glob) */mercurial/dispatch.py:* in dispatch (glob)