diff options
| -rwxr-xr-x | repo | 17 | 
1 files changed, 11 insertions, 6 deletions
| @@ -27,6 +27,7 @@ import platform | |||
| 27 | import shlex | 27 | import shlex | 
| 28 | import subprocess | 28 | import subprocess | 
| 29 | import sys | 29 | import sys | 
| 30 | from typing import NamedTuple | ||
| 30 | 31 | ||
| 31 | 32 | ||
| 32 | # These should never be newer than the main.py version since this needs to be a | 33 | # 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 | |||
| 217 | REPO_MAIN = S_repo + "/main.py" # main script | 218 | REPO_MAIN = S_repo + "/main.py" # main script | 
| 218 | 219 | ||
| 219 | 220 | ||
| 220 | import collections | ||
| 221 | import errno | 221 | import errno | 
| 222 | import json | 222 | import json | 
| 223 | import optparse | 223 | import optparse | 
| @@ -672,11 +672,16 @@ def run_git(*args, **kwargs): | |||
| 672 | raise CloneFailure() | 672 | raise CloneFailure() | 
| 673 | 673 | ||
| 674 | 674 | ||
| 675 | # The git version info broken down into components for easy analysis. | 675 | class GitVersion(NamedTuple): | 
| 676 | # Similar to Python's sys.version_info. | 676 | """The git version info broken down into components for easy analysis. | 
| 677 | GitVersion = collections.namedtuple( | 677 | |
| 678 | "GitVersion", ("major", "minor", "micro", "full") | 678 | Similar to Python's sys.version_info. | 
| 679 | ) | 679 | """ | 
| 680 | |||
| 681 | major: int | ||
| 682 | minor: int | ||
| 683 | micro: int | ||
| 684 | full: int | ||
| 680 | 685 | ||
| 681 | 686 | ||
| 682 | def ParseGitVersion(ver_str=None): | 687 | def ParseGitVersion(ver_str=None): | 
