Show More
@@ -1015,12 +1015,9 b' def _runcommand(ui, options, cmd, cmdfun' | |||||
1015 | else: |
|
1015 | else: | |
1016 | return checkargs() |
|
1016 | return checkargs() | |
1017 |
|
1017 | |||
1018 |
def |
|
1018 | def _exceptionwarning(ui): | |
1019 |
"""Produce a warning message for |
|
1019 | """Produce a warning message for the current active exception""" | |
1020 |
|
1020 | |||
1021 | Called when handling an exception; the exception is reraised if |
|
|||
1022 | this function returns False, ignored otherwise. |
|
|||
1023 | """ |
|
|||
1024 | # For compatibility checking, we discard the portion of the hg |
|
1021 | # For compatibility checking, we discard the portion of the hg | |
1025 | # version after the + on the assumption that if a "normal |
|
1022 | # version after the + on the assumption that if a "normal | |
1026 | # user" is running a build with a + in it the packager |
|
1023 | # user" is running a build with a + in it the packager | |
@@ -1072,6 +1069,15 b' def handlecommandexception(ui):' | |||||
1072 | util.version()) + |
|
1069 | util.version()) + | |
1073 | (_("** Extensions loaded: %s\n") % |
|
1070 | (_("** Extensions loaded: %s\n") % | |
1074 | ", ".join([x[0] for x in extensions.extensions()]))) |
|
1071 | ", ".join([x[0] for x in extensions.extensions()]))) | |
|
1072 | return warning | |||
|
1073 | ||||
|
1074 | def handlecommandexception(ui): | |||
|
1075 | """Produce a warning message for broken commands | |||
|
1076 | ||||
|
1077 | Called when handling an exception; the exception is reraised if | |||
|
1078 | this function returns False, ignored otherwise. | |||
|
1079 | """ | |||
|
1080 | warning = _exceptionwarning(ui) | |||
1075 | ui.log("commandexception", "%s\n%s\n", warning, traceback.format_exc()) |
|
1081 | ui.log("commandexception", "%s\n%s\n", warning, traceback.format_exc()) | |
1076 | ui.warn(warning) |
|
1082 | ui.warn(warning) | |
1077 | return False # re-raise the exception |
|
1083 | return False # re-raise the exception |
General Comments 0
You need to be logged in to leave comments.
Login now