mirror of
https://gerrit.googlesource.com/git-repo
synced 2026-11-14 16:27:13 +00:00
style: use import git_trace2_event_log everywhere
Align with Google style guides and `import git_trace2_event_log` as a module rather than import symbols out of it. Change-Id: I4fdb0692ccbcf38ecdd756a4417c68f0cfaebc0c Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/654815 Reviewed-by: Brian Gan <brgan@google.com> Tested-by: Mike Frysinger <vapier@google.com> Commit-Queue: Mike Frysinger <vapier@google.com>
This commit is contained in:
1 parent
ccddf51633
commit
221a31cd0a
3 files changed
+9
-12
No files matched your search
@@ -12,7 +12,6 @@ per-file-ignores =
|
||||
git_trace2_event_log.py: IMR241,
|
||||
main.py: IMR241,
|
||||
manifest_xml.py: IMR241,
|
||||
project.py: IMR241,
|
||||
subcmds/abandon.py: IMR241,
|
||||
subcmds/branches.py: IMR241,
|
||||
subcmds/checkout.py: IMR241,
|
||||
|
||||
@@ -49,7 +49,7 @@ import error
|
||||
import event_log
|
||||
import git_command
|
||||
import git_config
|
||||
from git_trace2_event_log import EventLog
|
||||
import git_trace2_event_log
|
||||
import manifest_xml
|
||||
import pager
|
||||
import repo_trace
|
||||
@@ -262,14 +262,12 @@ class _Repo:
|
||||
self._PrintHelp(short=True)
|
||||
return 1
|
||||
|
||||
git_trace2_event_log = EventLog()
|
||||
run = (
|
||||
lambda: self._RunLong(name, gopts, argv, git_trace2_event_log) or 0
|
||||
)
|
||||
git_event_log = git_trace2_event_log.EventLog()
|
||||
run = lambda: self._RunLong(name, gopts, argv, git_event_log) or 0
|
||||
with repo_trace.Trace(
|
||||
"starting new command: %s [sid=%s]",
|
||||
", ".join([name] + argv),
|
||||
git_trace2_event_log.full_sid,
|
||||
git_event_log.full_sid,
|
||||
first_trace=True,
|
||||
):
|
||||
if gopts.trace_python:
|
||||
|
||||
+5
-5
@@ -40,7 +40,7 @@ import git_config
|
||||
import git_refs
|
||||
import git_status
|
||||
import git_superproject
|
||||
from git_trace2_event_log import EventLog
|
||||
import git_trace2_event_log
|
||||
import platform_utils
|
||||
import progress
|
||||
import repo_logging
|
||||
@@ -340,7 +340,7 @@ class ReviewableBranch:
|
||||
validate_certs=True,
|
||||
push_options=None,
|
||||
patchset_description=None,
|
||||
git_event_log: Optional[EventLog] = None,
|
||||
git_event_log: Optional[git_trace2_event_log.EventLog] = None,
|
||||
quiet: bool = False,
|
||||
) -> None:
|
||||
self.project.UploadForReview(
|
||||
@@ -1569,7 +1569,7 @@ class Project:
|
||||
validate_certs=True,
|
||||
push_options=None,
|
||||
patchset_description=None,
|
||||
git_event_log: Optional[EventLog] = None,
|
||||
git_event_log: Optional[git_trace2_event_log.EventLog] = None,
|
||||
quiet: bool = False,
|
||||
) -> None:
|
||||
"""Uploads the named branch for code review."""
|
||||
@@ -6032,7 +6032,7 @@ class ManifestProject(MetaProject):
|
||||
# TODO(lamontjones): when refactoring sync (and init?) consider how to
|
||||
# better get the init options that we should use for new submanifests
|
||||
# that are added when syncing an existing workspace.
|
||||
git_event_log = git_event_log or EventLog()
|
||||
git_event_log = git_event_log or git_trace2_event_log.EventLog()
|
||||
spec = submanifest.ToSubmanifestSpec()
|
||||
# Use the init options from the existing manifestProject, or the parent
|
||||
# if it doesn't exist.
|
||||
@@ -6162,7 +6162,7 @@ class ManifestProject(MetaProject):
|
||||
with_platform=False
|
||||
)
|
||||
platform = platform or "auto"
|
||||
git_event_log = git_event_log or EventLog()
|
||||
git_event_log = git_event_log or git_trace2_event_log.EventLog()
|
||||
if outer_manifest and self.manifest.is_submanifest:
|
||||
# In a multi-manifest checkout, use the outer manifest unless we are
|
||||
# told not to.
|
||||
|
||||
Reference in new issue
Block a user