mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
superproject: Provide accurate feedback for user choice
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>
This commit is contained in:
parent
7f8bd85184
commit
1328c35a4d
@ -369,9 +369,14 @@ def _UseSuperprojectFromConfiguration():
|
|||||||
if user_expiration is not None and (user_expiration <= 0 or user_expiration >= time_now):
|
if user_expiration is not None and (user_expiration <= 0 or user_expiration >= time_now):
|
||||||
# TODO(b/190688390) - Remove prompt when we are comfortable with the new
|
# TODO(b/190688390) - Remove prompt when we are comfortable with the new
|
||||||
# default value.
|
# default value.
|
||||||
print(('You are currently enrolled in Git submodules experiment '
|
if user_value:
|
||||||
'(go/android-submodules-quickstart). Use --no-use-superproject '
|
print(('You are currently enrolled in Git submodules experiment '
|
||||||
'to override.\n'), file=sys.stderr)
|
'(go/android-submodules-quickstart). Use --no-use-superproject '
|
||||||
|
'to override.\n'), file=sys.stderr)
|
||||||
|
else:
|
||||||
|
print(('You are not currently enrolled in Git submodules experiment '
|
||||||
|
'(go/android-submodules-quickstart). Use --use-superproject '
|
||||||
|
'to override.\n'), file=sys.stderr)
|
||||||
return user_value
|
return user_value
|
||||||
|
|
||||||
# We don't have an unexpired choice, ask for one.
|
# We don't have an unexpired choice, ask for one.
|
||||||
|
Loading…
Reference in New Issue
Block a user