diff options
author | Josip Sokcevic <sokcevic@google.com> | 2023-05-12 17:00:46 -0700 |
---|---|---|
committer | LUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-05-17 18:06:14 +0000 |
commit | 131fc96381e112b0aa7a1012243e2ed5cfd3ec01 (patch) | |
tree | b5c87a061a4bec40ba5cdf57ded2154aac763cfc /subcmds/init.py | |
parent | 2ad5d508740a0bf3a4fe13bd27525b57da683a68 (diff) | |
download | git-repo-131fc96381e112b0aa7a1012243e2ed5cfd3ec01.tar.gz |
[git_trace2] Add logs for critical cmds
Trace logs emitted from repo are not useful on error for many critical
commands. This change adds errors for critical commands to trace logs.
Change-Id: Ideb9358bee31e540bd84a94327a09ff9b0246a77
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/373814
Reviewed-by: Joanna Wang <jojwang@google.com>
Tested-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Diffstat (limited to 'subcmds/init.py')
-rw-r--r-- | subcmds/init.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/subcmds/init.py b/subcmds/init.py index b5c2e3b5..9946466d 100644 --- a/subcmds/init.py +++ b/subcmds/init.py | |||
@@ -341,10 +341,12 @@ to update the working directory files. | |||
341 | quiet=opt.quiet, | 341 | quiet=opt.quiet, |
342 | ) | 342 | ) |
343 | except wrapper.CloneFailure: | 343 | except wrapper.CloneFailure: |
344 | err_msg = "fatal: double check your --repo-rev setting." | ||
344 | print( | 345 | print( |
345 | "fatal: double check your --repo-rev setting.", | 346 | err_msg, |
346 | file=sys.stderr, | 347 | file=sys.stderr, |
347 | ) | 348 | ) |
349 | self.git_event_log.ErrorEvent(err_msg) | ||
348 | sys.exit(1) | 350 | sys.exit(1) |
349 | branch = rp.GetBranch("default") | 351 | branch = rp.GetBranch("default") |
350 | branch.merge = remote_ref | 352 | branch.merge = remote_ref |