From 5fb9c6a5b35220e27b3acd5861318584588cd0d8 Mon Sep 17 00:00:00 2001 From: LaMont Jones Date: Tue, 8 Nov 2022 00:54:56 +0000 Subject: v2.29.7: Revert back to v2.29.5 This change reverts stable to v2.29.5, to fix clients that received v2.29.6, and keep future updates simpler. Change-Id: I2f5c52c466b7321665c9699ccdbf98f928483fee --- main.py | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) (limited to 'main.py') diff --git a/main.py b/main.py index e629b30f..c54f9281 100755 --- a/main.py +++ b/main.py @@ -37,7 +37,7 @@ except ImportError: from color import SetDefaultColoring import event_log -from repo_trace import SetTrace, Trace, SetTraceToStderr +from repo_trace import SetTrace from git_command import user_agent from git_config import RepoConfig from git_trace2_event_log import EventLog @@ -109,9 +109,6 @@ global_options.add_option('--color', global_options.add_option('--trace', dest='trace', action='store_true', help='trace git command execution (REPO_TRACE=1)') -global_options.add_option('--trace_to_stderr', - dest='trace_to_stderr', action='store_true', - help='trace outputs go to stderr in addition to .repo/TRACE_FILE') global_options.add_option('--trace-python', dest='trace_python', action='store_true', help='trace python command execution') @@ -201,6 +198,9 @@ class _Repo(object): """Execute the requested subcommand.""" result = 0 + if gopts.trace: + SetTrace() + # Handle options that terminate quickly first. if gopts.help or gopts.help_all: self._PrintHelp(short=False, all_commands=gopts.help_all) @@ -652,26 +652,17 @@ def _Main(argv): Version.wrapper_path = opt.wrapper_path repo = _Repo(opt.repodir) - try: init_http() name, gopts, argv = repo._ParseArgs(argv) - - if gopts.trace: - SetTrace() - - if gopts.trace_to_stderr: - SetTraceToStderr() - - with Trace('starting new command: %s', ', '.join([name] + argv), first_trace=True): - run = lambda: repo._Run(name, gopts, argv) or 0 - if gopts.trace_python: - import trace - tracer = trace.Trace(count=False, trace=True, timing=True, - ignoredirs=set(sys.path[1:])) - result = tracer.runfunc(run) - else: - result = run() + run = lambda: repo._Run(name, gopts, argv) or 0 + if gopts.trace_python: + import trace + tracer = trace.Trace(count=False, trace=True, timing=True, + ignoredirs=set(sys.path[1:])) + result = tracer.runfunc(run) + else: + result = run() except KeyboardInterrupt: print('aborted by user', file=sys.stderr) result = 1 -- cgit v1.2.3-54-g00ecf