diff -r d6caadff4779 -r 3ad1571d4852 mercurial/scmutil.py --- a/mercurial/scmutil.py Sun Apr 12 14:26:11 2015 -0400 +++ b/mercurial/scmutil.py Sun Apr 12 14:27:42 2015 -0400 @@ -10,7 +10,7 @@ import util, error, osutil, revset, similar, encoding, phases import pathutil import match as matchmod -import os, errno, re, glob, tempfile, shutil, stat +import os, errno, re, glob, tempfile, shutil, stat, inspect if os.name == 'nt': import scmwindows as scmplatform @@ -177,7 +177,9 @@ if tui.tracebackflag: util.debugstacktrace(msg, 2) else: - tui.write_err(msg + '\n') + curframe = inspect.currentframe() + calframe = inspect.getouterframes(curframe, 2) + tui.write_err('%s at: %s:%s (%s)\n' % ((msg,) + calframe[2][1:4])) def filteredhash(repo, maxrev): """build hash of filtered revisions in the current repoview.