diff options
Diffstat (limited to 'subcmds/init.py')
-rw-r--r-- | subcmds/init.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/subcmds/init.py b/subcmds/init.py index 529b212b..9ac42d8e 100644 --- a/subcmds/init.py +++ b/subcmds/init.py | |||
@@ -23,9 +23,12 @@ from error import UpdateManifestError | |||
23 | from git_command import git_require | 23 | from git_command import git_require |
24 | from git_command import MIN_GIT_VERSION_HARD | 24 | from git_command import MIN_GIT_VERSION_HARD |
25 | from git_command import MIN_GIT_VERSION_SOFT | 25 | from git_command import MIN_GIT_VERSION_SOFT |
26 | from repo_logging import RepoLogger | ||
26 | from wrapper import Wrapper | 27 | from wrapper import Wrapper |
27 | 28 | ||
28 | 29 | ||
30 | logger = RepoLogger(__file__) | ||
31 | |||
29 | _REPO_ALLOW_SHALLOW = os.environ.get("REPO_ALLOW_SHALLOW") | 32 | _REPO_ALLOW_SHALLOW = os.environ.get("REPO_ALLOW_SHALLOW") |
30 | 33 | ||
31 | 34 | ||
@@ -330,11 +333,11 @@ to update the working directory files. | |||
330 | def Execute(self, opt, args): | 333 | def Execute(self, opt, args): |
331 | git_require(MIN_GIT_VERSION_HARD, fail=True) | 334 | git_require(MIN_GIT_VERSION_HARD, fail=True) |
332 | if not git_require(MIN_GIT_VERSION_SOFT): | 335 | if not git_require(MIN_GIT_VERSION_SOFT): |
333 | print( | 336 | logger.warning( |
334 | "repo: warning: git-%s+ will soon be required; please upgrade " | 337 | "repo: warning: git-%s+ will soon be required; " |
335 | "your version of git to maintain support." | 338 | "please upgrade your version of git to maintain " |
336 | % (".".join(str(x) for x in MIN_GIT_VERSION_SOFT),), | 339 | "support.", |
337 | file=sys.stderr, | 340 | ".".join(str(x) for x in MIN_GIT_VERSION_SOFT), |
338 | ) | 341 | ) |
339 | 342 | ||
340 | rp = self.manifest.repoProject | 343 | rp = self.manifest.repoProject |
@@ -357,10 +360,7 @@ to update the working directory files. | |||
357 | ) | 360 | ) |
358 | except wrapper.CloneFailure as e: | 361 | except wrapper.CloneFailure as e: |
359 | err_msg = "fatal: double check your --repo-rev setting." | 362 | err_msg = "fatal: double check your --repo-rev setting." |
360 | print( | 363 | logger.error(err_msg) |
361 | err_msg, | ||
362 | file=sys.stderr, | ||
363 | ) | ||
364 | self.git_event_log.ErrorEvent(err_msg) | 364 | self.git_event_log.ErrorEvent(err_msg) |
365 | raise RepoUnhandledExceptionError(e) | 365 | raise RepoUnhandledExceptionError(e) |
366 | 366 | ||