mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
repo: Update from upstream
- 59b81c84ded4e2312b2b554d22a51dca89825bc3 launcher: change collections.namedtuple to typing.NamedTu... by Mike Frysinger <vapier@google.com> GitOrigin-RevId: 59b81c84ded4e2312b2b554d22a51dca89825bc3 Change-Id: Iadd0af8c670917eb4cd418b7f7184ee819ea9d2f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6410153 Auto-Submit: Copybara Service <copybara-worker-blackhole@google.com> Reviewed-by: Mike Frysinger <vapier@chromium.org> Commit-Queue: Mike Frysinger <vapier@chromium.org>
This commit is contained in:
committed by
LUCI CQ
parent
c214cd9faf
commit
416b5b3d73
@@ -27,6 +27,7 @@ import platform
|
||||
import shlex
|
||||
import subprocess
|
||||
import sys
|
||||
from typing import NamedTuple
|
||||
|
||||
|
||||
# These should never be newer than the main.py version since this needs to be a
|
||||
@@ -217,7 +218,6 @@ S_manifests = "manifests" # special manifest repository
|
||||
REPO_MAIN = S_repo + "/main.py" # main script
|
||||
|
||||
|
||||
import collections
|
||||
import errno
|
||||
import json
|
||||
import optparse
|
||||
@@ -672,11 +672,16 @@ def run_git(*args, **kwargs):
|
||||
raise CloneFailure()
|
||||
|
||||
|
||||
# The git version info broken down into components for easy analysis.
|
||||
# Similar to Python's sys.version_info.
|
||||
GitVersion = collections.namedtuple(
|
||||
"GitVersion", ("major", "minor", "micro", "full")
|
||||
)
|
||||
class GitVersion(NamedTuple):
|
||||
"""The git version info broken down into components for easy analysis.
|
||||
|
||||
Similar to Python's sys.version_info.
|
||||
"""
|
||||
|
||||
major: int
|
||||
minor: int
|
||||
micro: int
|
||||
full: int
|
||||
|
||||
|
||||
def ParseGitVersion(ver_str=None):
|
||||
|
||||
Reference in New Issue
Block a user