Commit Graph

5 Commits

Author SHA1 Message Date
Mads Kiilerich
4f33e7d63a tests: backout fa34f751f59a, debugstacktrace is now stable, drop workaround 2014-02-20 02:38:41 +01:00
Simon Heimberg
6c82ce566b tests: for consistent output flush between writing sterr and stdout
Because stdout and stderr are buffered, the order of the output is other way
around on some systems.
2014-01-28 02:23:48 +01:00
Simon Heimberg
d296c74aff tests: test-debugcommands.t also matches stack trace on python 2.4
Some versions of python 2.4 write ? instead of <module>. Ignore this detail by
a glob.
This fixes a failure spotted on buildbot, existing since this test lines were
introduced 1a6e234bd7c1.
2014-01-17 19:46:23 +01:00
Mads Kiilerich
771c21f193 util: introduce util.debugstacktrace for showing a stack trace without crashing
This is often very handy when hacking/debugging.

Calling util.debugstacktrace('hey') from a place in hg will give something like:
  hey at:
   ./hg:38                                     in <module>
   /home/user/hgsrc/mercurial/dispatch.py:28   in run
   /home/user/hgsrc/mercurial/dispatch.py:65   in dispatch
   /home/user/hgsrc/mercurial/dispatch.py:88   in _runcatch
   /home/user/hgsrc/mercurial/dispatch.py:740  in _dispatch
   /home/user/hgsrc/mercurial/dispatch.py:514  in runcommand
   /home/user/hgsrc/mercurial/dispatch.py:830  in _runcommand
   /home/user/hgsrc/mercurial/dispatch.py:801  in checkargs
   /home/user/hgsrc/mercurial/dispatch.py:737  in <lambda>
   /home/user/hgsrc/mercurial/util.py:472      in check
...
2014-01-12 23:28:21 +01:00
Patrick Mezard
c99c100ff8 debugrevlog: handle numrevs == numfull case (issue3537)
Instead of tracing back with a ZeroDivisionError.
2012-07-11 11:52:42 +02:00