diff options
author | Mike Frysinger <vapier@google.com> | 2020-02-11 18:51:08 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@google.com> | 2020-02-12 00:28:03 +0000 |
commit | 82caef67a16437b9c39e1f2c920cc6307767b1d6 (patch) | |
tree | 3405146a19806eac2f5d28012aac7235c12f1096 /subcmds/init.py | |
parent | 3645bd24200b0f97eaeb8f65552ec67cc5a3fce8 (diff) | |
download | git-repo-82caef67a16437b9c39e1f2c920cc6307767b1d6.tar.gz |
repo: lower min version of git a bit
We were perhaps a bit too hasty to jump to git-2.10. Existing LTS
releases of Ubuntu are quite old still: Trusty has 1.9 while Xenial
has 2.5. While we plan on dropping support for those eventually as
we migrate to Python 3.6, we don't need to be so strict just yet on
the git versions.
We also want to disconnect the version the repo launcher requires
from the version the rest of the source tree requires. The repo
launcher doesn't need as many features, and being flexible there
allows us more freedom to upgrade & rollback as needed.
So we'll allow git-1.7 again, but start warning on any users older
than git-1.9. This aligns better with existing LTS releases, and
gives users a chance to start upgrading before we cut them off.
Change-Id: I140305dd8e42c9719c84e2aee0dc6a5c5b18da25
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254573
Reviewed-by: David Pursehouse <dpursehouse@collab.net>
Tested-by: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'subcmds/init.py')
-rw-r--r-- | subcmds/init.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/subcmds/init.py b/subcmds/init.py index 6594a602..a7950069 100644 --- a/subcmds/init.py +++ b/subcmds/init.py | |||
@@ -34,7 +34,7 @@ from command import InteractiveCommand, MirrorSafeCommand | |||
34 | from error import ManifestParseError | 34 | from error import ManifestParseError |
35 | from project import SyncBuffer | 35 | from project import SyncBuffer |
36 | from git_config import GitConfig | 36 | from git_config import GitConfig |
37 | from git_command import git_require, MIN_GIT_VERSION | 37 | from git_command import git_require, MIN_GIT_VERSION_SOFT, MIN_GIT_VERSION_HARD |
38 | import platform_utils | 38 | import platform_utils |
39 | 39 | ||
40 | class Init(InteractiveCommand, MirrorSafeCommand): | 40 | class Init(InteractiveCommand, MirrorSafeCommand): |
@@ -451,7 +451,12 @@ to update the working directory files. | |||
451 | self.OptionParser.error('--mirror and --archive cannot be used together.') | 451 | self.OptionParser.error('--mirror and --archive cannot be used together.') |
452 | 452 | ||
453 | def Execute(self, opt, args): | 453 | def Execute(self, opt, args): |
454 | git_require(MIN_GIT_VERSION, fail=True) | 454 | git_require(MIN_GIT_VERSION_HARD, fail=True) |
455 | if not git_require(MIN_GIT_VERSION_SOFT): | ||
456 | print('repo: warning: git-%s+ will soon be required; please upgrade your ' | ||
457 | 'version of git to maintain support.' | ||
458 | % ('.'.join(str(x) for x in MIN_GIT_VERSION_SOFT),), | ||
459 | file=sys.stderr) | ||
455 | 460 | ||
456 | self._SyncManifest(opt) | 461 | self._SyncManifest(opt) |
457 | self._LinkManifest(opt.manifest_name) | 462 | self._LinkManifest(opt.manifest_name) |