diff options
-rwxr-xr-x | repo | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -124,7 +124,7 @@ if not REPO_REV: | |||
124 | BUG_URL = "https://issues.gerritcodereview.com/issues/new?component=1370071" | 124 | BUG_URL = "https://issues.gerritcodereview.com/issues/new?component=1370071" |
125 | 125 | ||
126 | # increment this whenever we make important changes to this script | 126 | # increment this whenever we make important changes to this script |
127 | VERSION = (2, 48) | 127 | VERSION = (2, 50) |
128 | 128 | ||
129 | # increment this if the MAINTAINER_KEYS block is modified | 129 | # increment this if the MAINTAINER_KEYS block is modified |
130 | KEYRING_VERSION = (2, 3) | 130 | KEYRING_VERSION = (2, 3) |
@@ -1335,10 +1335,11 @@ def _Help(args): | |||
1335 | 1335 | ||
1336 | def _Version(): | 1336 | def _Version(): |
1337 | """Show version information.""" | 1337 | """Show version information.""" |
1338 | git_version = ParseGitVersion() | ||
1338 | print("<repo not installed>") | 1339 | print("<repo not installed>") |
1339 | print(f"repo launcher version {'.'.join(str(x) for x in VERSION)}") | 1340 | print(f"repo launcher version {'.'.join(str(x) for x in VERSION)}") |
1340 | print(f" (from {__file__})") | 1341 | print(f" (from {__file__})") |
1341 | print(f"git {ParseGitVersion().full}") | 1342 | print(f"git {git_version.full}" if git_version else "git not installed") |
1342 | print(f"Python {sys.version}") | 1343 | print(f"Python {sys.version}") |
1343 | uname = platform.uname() | 1344 | uname = platform.uname() |
1344 | print(f"OS {uname.system} {uname.release} ({uname.version})") | 1345 | print(f"OS {uname.system} {uname.release} ({uname.version})") |
@@ -1371,11 +1372,11 @@ def _RunSelf(wrapper_path): | |||
1371 | my_main = os.path.join(my_dir, "main.py") | 1372 | my_main = os.path.join(my_dir, "main.py") |
1372 | my_git = os.path.join(my_dir, ".git") | 1373 | my_git = os.path.join(my_dir, ".git") |
1373 | 1374 | ||
1374 | if os.path.isfile(my_main) and os.path.isdir(my_git): | 1375 | if os.path.isfile(my_main): |
1375 | for name in ["git_config.py", "project.py", "subcmds"]: | 1376 | for name in ["git_config.py", "project.py", "subcmds"]: |
1376 | if not os.path.exists(os.path.join(my_dir, name)): | 1377 | if not os.path.exists(os.path.join(my_dir, name)): |
1377 | return None, None | 1378 | return None, None |
1378 | return my_main, my_git | 1379 | return my_main, my_git if os.path.isdir(my_git) else None |
1379 | return None, None | 1380 | return None, None |
1380 | 1381 | ||
1381 | 1382 | ||