gclient: error if revert command is called in cog env

Bug: 339231299
Change-Id: I1b8741b3de4827edcfac61872626c901ffdecbfe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5534147
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Auto-Submit: Yiwei Zhang <yiwzhang@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
changes/47/5534147/2
Yiwei Zhang 1 year ago committed by LUCI CQ
parent c5e2ceabe3
commit fa85abfd7c

@ -3923,8 +3923,13 @@ def CMDdiff(parser, args):
def CMDrevert(parser, args):
"""Reverts all modifications in every dependencies.
That's the nuclear option to get back to a 'clean' state. It removes anything
that shows up in git status."""
That's the nuclear option to get back to a 'clean' state. It removes
anything that shows up in git status."""
if gclient_utils.IsEnvCog():
raise gclient_utils.Error(
'gclient revert command is not supported. Please navigate to '
'source control view in the activiy bar to discard changes '
'instead.')
parser.add_option('--deps',
dest='deps_os',
metavar='OS_LIST',

Loading…
Cancel
Save