diff options
author | Xin Li <delphij@google.com> | 2021-09-08 00:25:30 -0700 |
---|---|---|
committer | Xin Li <delphij@google.com> | 2021-09-08 20:35:42 +0000 |
commit | 1328c35a4d0b47c7e8c00fe351f0e587481e28c2 (patch) | |
tree | 36c08621679381b3fd97e5cb27c3843b2ae36471 | |
parent | 7f8bd85184deae52861513b6fd602508eebdd232 (diff) | |
download | git-repo-1328c35a4d0b47c7e8c00fe351f0e587481e28c2.tar.gz |
superproject: Provide accurate feedback for user choicev2.16.7
Currently the code would give a message that would appear like the user
have enrolled the experiment regardless of the actual choice. For users
who choose to not enroll in the experiment, we should give them
instructions to override (enable) superproject once instead of how to
disable it, which is what the code already behave.
Bug: [google internal] b/199167992
Change-Id: Iba3314cb510aedf024375a26baa8bc1d5e2846cf
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/317382
Tested-by: Xin Li <delphij@google.com>
Reviewed-by: Raman Tenneti <rtenneti@google.com>
-rw-r--r-- | git_superproject.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/git_superproject.py b/git_superproject.py index 3b23d292..19b91259 100644 --- a/git_superproject.py +++ b/git_superproject.py | |||
@@ -369,9 +369,14 @@ def _UseSuperprojectFromConfiguration(): | |||
369 | if user_expiration is not None and (user_expiration <= 0 or user_expiration >= time_now): | 369 | if user_expiration is not None and (user_expiration <= 0 or user_expiration >= time_now): |
370 | # TODO(b/190688390) - Remove prompt when we are comfortable with the new | 370 | # TODO(b/190688390) - Remove prompt when we are comfortable with the new |
371 | # default value. | 371 | # default value. |
372 | print(('You are currently enrolled in Git submodules experiment ' | 372 | if user_value: |
373 | '(go/android-submodules-quickstart). Use --no-use-superproject ' | 373 | print(('You are currently enrolled in Git submodules experiment ' |
374 | 'to override.\n'), file=sys.stderr) | 374 | '(go/android-submodules-quickstart). Use --no-use-superproject ' |
375 | 'to override.\n'), file=sys.stderr) | ||
376 | else: | ||
377 | print(('You are not currently enrolled in Git submodules experiment ' | ||
378 | '(go/android-submodules-quickstart). Use --use-superproject ' | ||
379 | 'to override.\n'), file=sys.stderr) | ||
375 | return user_value | 380 | return user_value |
376 | 381 | ||
377 | # We don't have an unexpired choice, ask for one. | 382 | # We don't have an unexpired choice, ask for one. |