Rev 4683: Put the 'debug_memory' check into the finally clause. in http://bazaar.launchpad.net/~jameinel/bzr/2.1b1-always-debug-memory
John Arbash Meinel
john at arbash-meinel.com
Wed Sep 9 18:51:35 BST 2009
At http://bazaar.launchpad.net/~jameinel/bzr/2.1b1-always-debug-memory
------------------------------------------------------------
revno: 4683
revision-id: john at arbash-meinel.com-20090909175119-2q9o6i26x540swkn
parent: pqm at pqm.ubuntu.com-20090909162106-ar32j79ayhfrkap3
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.1b1-always-debug-memory
timestamp: Wed 2009-09-09 12:51:19 -0500
message:
Put the 'debug_memory' check into the finally clause.
This way, even if the command being run ends up with an exception (such as MemoryError
we can still dump the memory consumption for investigation.)
-------------- next part --------------
=== modified file 'bzrlib/commands.py'
--- a/bzrlib/commands.py 2009-06-19 09:06:56 +0000
+++ b/bzrlib/commands.py 2009-09-09 17:51:19 +0000
@@ -1028,13 +1028,13 @@
ret = apply_coveraged(opt_coverage_dir, run, *run_argv)
else:
ret = run(*run_argv)
- if 'memory' in debug.debug_flags:
- trace.debug_memory('Process status after command:', short=False)
return ret or 0
finally:
# reset, in case we may do other commands later within the same
# process. Commands that want to execute sub-commands must propagate
# --verbose in their own way.
+ if 'memory' in debug.debug_flags:
+ trace.debug_memory('Process status after command:', short=False)
option._verbosity_level = saved_verbosity_level
More information about the bazaar-commits
mailing list