diff options
author | Mike Frysinger <vapier@google.com> | 2024-03-21 12:58:01 -0400 |
---|---|---|
committer | LUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2024-03-21 21:20:50 +0000 |
commit | 4406642e20d2b984631e6099664058013095ce49 (patch) | |
tree | 1110d5f6d97d238eca58405af96f9d1e1324be80 /wrapper.py | |
parent | 73356f1d5ccbebf5a33e5e9aa1ba06c5f5437fed (diff) | |
download | git-repo-4406642e20d2b984631e6099664058013095ce49.tar.gz |
git_command: unify soft/hard versions with requirements.json
Use the requirements logic in the wrapper to load versions out of the
requirements.json file to avoid duplicating them in git_command.py.
Change-Id: Ib479049fc54ebc6f52c2c30d1315cf1734ff1990
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/415617
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Mike Frysinger <vapier@google.com>
Tested-by: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'wrapper.py')
-rw-r--r-- | wrapper.py | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -18,8 +18,12 @@ import importlib.util | |||
18 | import os | 18 | import os |
19 | 19 | ||
20 | 20 | ||
21 | def WrapperDir(): | ||
22 | return os.path.dirname(__file__) | ||
23 | |||
24 | |||
21 | def WrapperPath(): | 25 | def WrapperPath(): |
22 | return os.path.join(os.path.dirname(__file__), "repo") | 26 | return os.path.join(WrapperDir(), "repo") |
23 | 27 | ||
24 | 28 | ||
25 | @functools.lru_cache(maxsize=None) | 29 | @functools.lru_cache(maxsize=None) |