changeset 817c662677d1 in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=817c662677d1
description:
style: prevent the style hook from aborting uncleanly because of an
exception
diffstat:
util/style.py | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
diffs (30 lines):
diff -r 49b7d40ee88a -r 817c662677d1 util/style.py
--- a/util/style.py Mon Jan 10 11:11:15 2011 -0800
+++ b/util/style.py Mon Jan 10 11:11:16 2011 -0800
@@ -341,12 +341,24 @@
def check_style(ui, repo, hooktype, **kwargs):
check_hook(hooktype)
args = {}
- return do_check_style(ui, repo, **args)
+
+ try:
+ return do_check_style(ui, repo, **args)
+ except Exception, e:
+ import traceback
+ traceback.print_exc()
+ return True
def check_format(ui, repo, hooktype, **kwargs):
check_hook(hooktype)
args = {}
- return do_check_format(ui, repo, **args)
+
+ try:
+ return do_check_format(ui, repo, **args)
+ except Exception, e:
+ import traceback
+ traceback.print_exc()
+ return True
try:
from mercurial.i18n import _
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev