diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -926,7 +926,7 @@ class localrepository(object): 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 @@ class localrepository(object): 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 --git a/mercurial/scmutil.py b/mercurial/scmutil.py --- a/mercurial/scmutil.py +++ b/mercurial/scmutil.py @@ -177,7 +177,7 @@ def develwarn(tui, msg): 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 --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 @@ -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)