1
0
Fork 0

[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>
This commit is contained in:
Josip Sokcevic 2023-05-12 17:00:46 -07:00 committed by LUCI
parent 2ad5d50874
commit 131fc96381
6 changed files with 26 additions and 20 deletions

View file

@ -206,7 +206,9 @@ branch but need to incorporate new upstream changes "underneath" them.
ret += 1
if ret:
out.fail("%i projects had errors", ret)
msg_fmt = "%d projects had errors"
self.git_event_log.ErrorEvent(msg_fmt % (ret), msg_fmt)
out.fail(msg_fmt, ret)
out.nl()
return ret